[llvm-branch-commits] [mlir] 30b1ae5 - [mlir] Make conversion functions inline instead of static to avoid -Wunused-function

David Blaikie via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 3 13:15:17 PST 2020


Author: David Blaikie
Date: 2020-12-03T13:09:36-08:00
New Revision: 30b1ae591657a14292f2134b426559c3aa6a289d

URL: https://github.com/llvm/llvm-project/commit/30b1ae591657a14292f2134b426559c3aa6a289d
DIFF: https://github.com/llvm/llvm-project/commit/30b1ae591657a14292f2134b426559c3aa6a289d.diff

LOG: [mlir] Make conversion functions inline instead of static to avoid -Wunused-function

Added: 
    

Modified: 
    mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
index f62e7aebe24a..f748b56b1bdf 100644
--- a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
+++ b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
@@ -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";
 


        


More information about the llvm-branch-commits mailing list