Skip to content

Commit 1c8c2fd

Browse files
committed
[mlir] Fix -Wdeprecated-declarations in BufferResultsToOutParams.cpp (NFC)
/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp:124:26: error: 'cast' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations] 124 | orig.getType().cast<MemRefType>().hasStaticShape()) { |
1 parent 0af448b commit 1c8c2fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static LogicalResult updateReturnOps(func::FuncOp func,
121121
OpBuilder builder(op);
122122
for (auto [orig, arg] : llvm::zip(copyIntoOutParams, appendedEntryArgs)) {
123123
if (hoistStaticAllocs && isa<memref::AllocOp>(orig.getDefiningOp()) &&
124-
orig.getType().cast<MemRefType>().hasStaticShape()) {
124+
mlir::cast<MemRefType>(orig.getType()).hasStaticShape()) {
125125
orig.replaceAllUsesWith(arg);
126126
orig.getDefiningOp()->erase();
127127
} else {

0 commit comments

Comments
 (0)