Summary:
Fix this warning:
`
[69/106] Building CXX object tools/mlir/lib/Dialect/StandardOps/CMakeFiles/MLIRStandardOps.dir/Ops.cpp.o
/home/uday/llvm-project/mlir/lib/Dialect/StandardOps/Ops.cpp: In member function ‘virtual mlir::PatternMatchResult {anonymous}::ViewOpShapeFolder::matchAndRewrite(mlir::ViewOp, mlir::PatternRewriter&) const’:
/home/uday/llvm-project/mlir/lib/Dialect/StandardOps/Ops.cpp:2575:14: warning: variable ‘dynamicOffsetOperandCount’ set but not used [-Wunused-but-set-variable]
2575 | unsigned dynamicOffsetOperandCount = 0;
`
Reviewers: rriddle, mehdi_amini, ftynse
Reviewed By: ftynse
Subscribers: jpienaar, burmako, shauheen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71922
auto newMemRefType =
MemRefType::get(newShapeConstants, memrefType.getElementType(), {map},
memrefType.getMemorySpace());
+ (void)dynamicOffsetOperandCount; // unused in opt mode
assert(static_cast<int64_t>(newOperands.size()) ==
dynamicOffsetOperandCount + newMemRefType.getNumDynamicDims());