[Mlir-commits] [mlir] 3bcb6a3 - Silence `-Wunused-private-field` warning on isIsolatedFromAbove.

Christian Sigg llvmlistbot at llvm.org
Sat Apr 3 06:45:29 PDT 2021


Author: Christian Sigg
Date: 2021-04-03T15:45:21+02:00
New Revision: 3bcb6a389ff4338d76a25b7d9e0e3c40d84695be

URL: https://github.com/llvm/llvm-project/commit/3bcb6a389ff4338d76a25b7d9e0e3c40d84695be
DIFF: https://github.com/llvm/llvm-project/commit/3bcb6a389ff4338d76a25b7d9e0e3c40d84695be.diff

LOG: Silence `-Wunused-private-field` warning on isIsolatedFromAbove.

NDEBUG builds currently warn because it's only used inside an assert.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D99721

Added: 
    

Modified: 
    mlir/lib/Parser/Parser.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index 381338d4226de..8d413ad9d5306 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -931,7 +931,9 @@ class CustomOpAsmParser : public OpAsmParser {
       bool isIsolatedFromAbove, StringRef opName, OperationParser &parser)
       : nameLoc(nameLoc), resultIDs(resultIDs), parseAssembly(parseAssembly),
         isIsolatedFromAbove(isIsolatedFromAbove), opName(opName),
-        parser(parser) {}
+        parser(parser) {
+    (void)isIsolatedFromAbove; // Only used in assert, silence unused warning.
+  }
 
   /// Parse an instance of the operation described by 'opDefinition' into the
   /// provided operation state.


        


More information about the Mlir-commits mailing list