[Mlir-commits] [mlir] aa8f5e6 - [mlir] Fix -Wunused-variable in TransformInterfaces.h (NFC)

Jie Fu llvmlistbot at llvm.org
Mon Sep 25 06:56:47 PDT 2023


Author: Jie Fu
Date: 2023-09-25T21:56:27+08:00
New Revision: aa8f5e6156821aec1fed595f2e13d69655ec3311

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

LOG: [mlir] Fix -Wunused-variable in TransformInterfaces.h (NFC)

/llvm-project/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h:235:12: error: unused variable 'sameTimestamp' [-Werror,-Wunused-variable]
      bool sameTimestamp =
           ^
/llvm-project/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h:260:12: error: unused variable 'sameTimestamp' [-Werror,-Wunused-variable]
      bool sameTimestamp =
           ^
2 errors generated.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
index 0ac3c9a16e03a36..b45861e6190c18a 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
@@ -232,7 +232,7 @@ class TransformState {
     // the data structure is compacted). Do not enumerate these ops.
     return llvm::make_filter_range(view, [=](Operation *op) {
 #ifdef LLVM_ENABLE_ABI_BREAKING_CHECKS
-      bool sameTimestamp =
+      [[maybe_unused]] bool sameTimestamp =
           currentTimestamp == this->getMapping(value).timestamps.lookup(value);
       assert(sameTimestamp && "iterator was invalidated during iteration");
 #endif // LLVM_ENABLE_ABI_BREAKING_CHECKS
@@ -257,7 +257,7 @@ class TransformState {
     int64_t currentTimestamp =
         getMapping(handleValue).timestamps.lookup(handleValue);
     return llvm::make_filter_range(view, [=](Value v) {
-      bool sameTimestamp =
+      [[maybe_unused]] bool sameTimestamp =
           currentTimestamp ==
           this->getMapping(handleValue).timestamps.lookup(handleValue);
       assert(sameTimestamp && "iterator was invalidated during iteration");


        


More information about the Mlir-commits mailing list