aboutsummaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorJie Fu <jiefu@tencent.com>2024-05-01 10:28:29 +0800
committerJie Fu <jiefu@tencent.com>2024-05-01 10:28:29 +0800
commit63a29693011048b472205022319c6769b244a5ba (patch)
treecc3182bf126d8429653395fe2c1a437bbe40b238 /cross-project-tests
parentb1b1bfa7bea0ce489b5ea9134e17a43c695df5ec (diff)
downloadllvm-63a29693011048b472205022319c6769b244a5ba.zip
llvm-63a29693011048b472205022319c6769b244a5ba.tar.gz
llvm-63a29693011048b472205022319c6769b244a5ba.tar.bz2
[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.
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
index 677418a..0260284 100644
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
+++ b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
@@ -38,7 +38,7 @@ mlir::Attribute TypeAttr = mlir::TypeAttr::get(IndexType);
mlir::Attribute ArrayAttr = mlir::ArrayAttr::get(&Context, {UnitAttr});
mlir::Attribute StringAttr = mlir::StringAttr::get(&Context, "foo");
mlir::Attribute ElementsAttr = mlir::DenseElementsAttr::get(
- VectorType.cast<mlir::ShapedType>(), llvm::ArrayRef<float>{2.0f, 3.0f});
+ mlir::cast<mlir::ShapedType>(VectorType), llvm::ArrayRef<float>{2.0f, 3.0f});
int main() {
// Reference symbols that might otherwise be stripped.