Skip to content

Commit 63a2969

Browse files
committed
[cross-project-tests] Update code to use mlir::cast (NFC)
/llvm-project/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp:41:16: error: 'cast' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations] VectorType.cast<mlir::ShapedType>(), llvm::ArrayRef<float>{2.0f, 3.0f}); ^ /llvm-project/llvm/../mlir/include/mlir/IR/Types.h:345:9: note: 'cast' has been explicitly marked deprecated here U Type::cast() const { ^ /llvm-project/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp:41:16: error: 'cast<mlir::ShapedType>' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations] VectorType.cast<mlir::ShapedType>(), llvm::ArrayRef<float>{2.0f, 3.0f}); ^ /llvm-project/llvm/../mlir/include/mlir/IR/Types.h:112:5: note: 'cast<mlir::ShapedType>' has been explicitly marked deprecated here [[deprecated("Use mlir::cast<U>() instead")]] ^ 2 errors generated.
1 parent b1b1bfa commit 63a2969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mlir::Attribute TypeAttr = mlir::TypeAttr::get(IndexType);
3838
mlir::Attribute ArrayAttr = mlir::ArrayAttr::get(&Context, {UnitAttr});
3939
mlir::Attribute StringAttr = mlir::StringAttr::get(&Context, "foo");
4040
mlir::Attribute ElementsAttr = mlir::DenseElementsAttr::get(
41-
VectorType.cast<mlir::ShapedType>(), llvm::ArrayRef<float>{2.0f, 3.0f});
41+
mlir::cast<mlir::ShapedType>(VectorType), llvm::ArrayRef<float>{2.0f, 3.0f});
4242

4343
int main() {
4444
// Reference symbols that might otherwise be stripped.

0 commit comments

Comments
 (0)