[Mlir-commits] [mlir] 2e32525 - [mlir] Fix unused var warning in the IR/MemRefOps.cpp

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Mar 1 11:54:01 PST 2022


Author: rdzhabarov
Date: 2022-03-01T19:53:52Z
New Revision: 2e32525d95bd48c0b5fa3a6aca7221b2081335e7

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

LOG: [mlir] Fix unused var warning in the IR/MemRefOps.cpp

Fix unused var compiler warning.

Reviewed By: Mogball

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

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 1fc3ab2eb280d..7aff36ff2b9db 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -368,8 +368,8 @@ struct AllocaScopeHoister : public OpRewritePattern<AllocaScopeOp> {
           !lastNonTerminatorInRegion(lastParentWithoutScope))
         return failure();
     }
-    Operation *scope = lastParentWithoutScope->getParentOp();
-    assert(scope->hasTrait<OpTrait::AutomaticAllocationScope>());
+    assert(lastParentWithoutScope->getParentOp()
+               ->hasTrait<OpTrait::AutomaticAllocationScope>());
 
     Region *containingRegion = nullptr;
     for (auto &r : lastParentWithoutScope->getRegions()) {


        


More information about the Mlir-commits mailing list