Skip to content

Commit 9d8950a

Browse files
committed
[mlir] 'dyn_cast' is deprecated: Use mlir::dyn_cast<U>() instead (NFC)
/llvm-project/mlir/lib/Dialect/Vector/IR/VectorOps.cpp:2923:29: error: 'dyn_cast' is deprecated: Use mlir::dyn_cast<U>() instead [-Werror,-Wdeprecated-declarations] 2923 | if (auto intAttr = attr.dyn_cast<IntegerAttr>()) { | ^ /llvm-project/mlir/include/mlir/IR/Attributes.h:184:14: note: 'dyn_cast' has been explicitly marked deprecated here 184 | U Attribute::dyn_cast() const { | ^
1 parent 3d7af09 commit 9d8950a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2920,7 +2920,7 @@ class InsertOpConstantFolder final : public OpRewritePattern<InsertOp> {
29202920
/// Converts the expected type to an IntegerAttr if there's
29212921
/// a mismatch.
29222922
Attribute convertIntegerAttr(Attribute attr, Type expectedType) const {
2923-
if (auto intAttr = attr.dyn_cast<IntegerAttr>()) {
2923+
if (auto intAttr = mlir::dyn_cast<IntegerAttr>(attr)) {
29242924
if (intAttr.getType() != expectedType)
29252925
return IntegerAttr::get(expectedType, intAttr.getInt());
29262926
}

0 commit comments

Comments
 (0)