[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
This commit is contained in:
rdzhabarov 2022-03-01 19:44:12 +00:00
parent 1f4bb9c69f
commit 2e32525d95
1 changed files with 2 additions and 2 deletions

View File

@ -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()) {