[Mlir-commits] [mlir] 0856f12 - [mlir] Fix -Wunused-variable in OmpOpGen.cpp (NFC)

Jie Fu llvmlistbot at llvm.org
Wed Sep 11 04:59:38 PDT 2024


Author: Jie Fu
Date: 2024-09-11T19:59:00+08:00
New Revision: 0856f12bb0a9829a282bef7c26ad536ff3b1e0a5

URL: https://github.com/llvm/llvm-project/commit/0856f12bb0a9829a282bef7c26ad536ff3b1e0a5
DIFF: https://github.com/llvm/llvm-project/commit/0856f12bb0a9829a282bef7c26ad536ff3b1e0a5.diff

LOG: [mlir] Fix -Wunused-variable in OmpOpGen.cpp (NFC)

/llvm-project/mlir/tools/mlir-tblgen/OmpOpGen.cpp:239:8:
error: unused variable 'isAttr' [-Werror,-Wunused-variable]
  bool isAttr = superClasses.contains("Attr");
       ^

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OmpOpGen.cpp b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
index c9d25a5dee5cd7..23368c56bee8c5 100644
--- a/mlir/tools/mlir-tblgen/OmpOpGen.cpp
+++ b/mlir/tools/mlir-tblgen/OmpOpGen.cpp
@@ -236,7 +236,7 @@ static StringRef translateArgumentType(ArrayRef<SMLoc> loc, StringInit *name,
   }
 
   // Handle simple attribute and value types.
-  bool isAttr = superClasses.contains("Attr");
+  [[maybe_unused]] bool isAttr = superClasses.contains("Attr");
   bool isValue = superClasses.contains("TypeConstraint");
   if (superClasses.contains("Variadic"))
     ++nest;


        


More information about the Mlir-commits mailing list