Make header-defined function inline instead of static (NFC)
authorMehdi Amini <aminim@google.com>
Fri, 10 May 2019 16:21:37 +0000 (09:21 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 11 May 2019 02:28:45 +0000 (19:28 -0700)
    Fix warning for unused function when the header is included in
    an implementation file that does not use this function.

--

PiperOrigin-RevId: 247622232

mlir/include/mlir/Analysis/NestedMatcher.h

index eb2bdd4..a86cf94 100644 (file)
@@ -95,7 +95,7 @@ private:
 /// a plain walk over operations to match flat patterns but the current
 /// implementation is competitive nonetheless.
 using FilterFunctionType = std::function<bool(Operation &)>;
-static bool defaultFilterFunction(Operation &) { return true; }
+inline bool defaultFilterFunction(Operation &) { return true; }
 struct NestedPattern {
   NestedPattern(ArrayRef<NestedPattern> nested,
                 FilterFunctionType filter = defaultFilterFunction);