Skip to content

Commit

Permalink
[mlir] Fix -Wdeprecated-declarations in BufferResultsToOutParams.cpp …
Browse files Browse the repository at this point in the history
…(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()) {
      |
  • Loading branch information
DamonFool committed May 8, 2024
1 parent 0af448b commit 1c8c2fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static LogicalResult updateReturnOps(func::FuncOp func,
OpBuilder builder(op);
for (auto [orig, arg] : llvm::zip(copyIntoOutParams, appendedEntryArgs)) {
if (hoistStaticAllocs && isa<memref::AllocOp>(orig.getDefiningOp()) &&
orig.getType().cast<MemRefType>().hasStaticShape()) {
mlir::cast<MemRefType>(orig.getType()).hasStaticShape()) {
orig.replaceAllUsesWith(arg);
orig.getDefiningOp()->erase();
} else {
Expand Down

0 comments on commit 1c8c2fd

Please sign in to comment.