[mlir] Hotfix - Add inline to avoid multiple symbols on trivial functions
authorNicolas Vasilache <ntv@google.com>
Tue, 26 May 2020 20:24:56 +0000 (16:24 -0400)
committerNicolas Vasilache <ntv@google.com>
Tue, 26 May 2020 20:24:56 +0000 (16:24 -0400)
mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h

index 13db3a2..168e877 100644 (file)
@@ -81,21 +81,21 @@ constexpr StringRef getPaddingAttrName() { return "padding"; }
 
 /// Use to encode that a particular iterator type has parallel semantics.
 constexpr StringRef getParallelIteratorTypeName() { return "parallel"; }
-bool isParallelIterator(Attribute attr) {
+inline bool isParallelIterator(Attribute attr) {
   auto strAttr = attr.dyn_cast_or_null<StringAttr>();
   return strAttr && strAttr.getValue() == getParallelIteratorTypeName();
 }
 
 /// Use to encode that a particular iterator type has reduction semantics.
 constexpr StringRef getReductionIteratorTypeName() { return "reduction"; }
-bool isReductionIterator(Attribute attr) {
+inline bool isReductionIterator(Attribute attr) {
   auto strAttr = attr.dyn_cast_or_null<StringAttr>();
   return strAttr && strAttr.getValue() == getReductionIteratorTypeName();
 }
 
 /// Use to encode that a particular iterator type has window semantics.
 constexpr StringRef getWindowIteratorTypeName() { return "window"; }
-bool isWindowIterator(Attribute attr) {
+inline bool isWindowIterator(Attribute attr) {
   auto strAttr = attr.dyn_cast_or_null<StringAttr>();
   return strAttr && strAttr.getValue() == getWindowIteratorTypeName();
 }