[mlir] Make conversion functions inline instead of static to avoid -Wunused-function
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 3 Dec 2020 21:08:22 +0000 (13:08 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 3 Dec 2020 21:09:36 +0000 (13:09 -0800)
mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp

index f62e7ae..f748b56 100644 (file)
@@ -250,7 +250,7 @@ static void emitOneEnumFromConversion(const llvm::Record *record,
   StringRef cppNamespace = enumAttr.getCppNamespace();
 
   // Emit the function converting the enum attribute from its LLVM counterpart.
-  os << formatv("static {0}::{1} convert{1}FromLLVM({2} value) {{\n",
+  os << formatv("inline {0}::{1} convert{1}FromLLVM({2} value) {{\n",
                 cppNamespace, cppClassName, llvmClass);
   os << "  switch (value) {\n";