From 96d5d9eedfa941dd971b9747081ca8b390315c3e Mon Sep 17 00:00:00 2001 From: Jakub Kuderski Date: Sat, 25 Jan 2025 13:28:13 -0500 Subject: [PATCH] [mlir] Fix deprecated pointer union casts in toy example --- mlir/examples/toy/Ch4/mlir/Dialect.cpp | 2 +- mlir/examples/toy/Ch5/mlir/Dialect.cpp | 2 +- mlir/examples/toy/Ch6/mlir/Dialect.cpp | 2 +- mlir/examples/toy/Ch7/mlir/Dialect.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/examples/toy/Ch4/mlir/Dialect.cpp b/mlir/examples/toy/Ch4/mlir/Dialect.cpp index 6c6cdd934cea8..076a75a26619b 100644 --- a/mlir/examples/toy/Ch4/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch4/mlir/Dialect.cpp @@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() { /// Set the callee for the generic call operation, this is required by the call /// interface. void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) { - (*this)->setAttr("callee", callee.get()); + (*this)->setAttr("callee", cast(callee)); } /// Get the argument operands to the called function, this is required by the diff --git a/mlir/examples/toy/Ch5/mlir/Dialect.cpp b/mlir/examples/toy/Ch5/mlir/Dialect.cpp index 72072f9188bf3..fb7c742a01802 100644 --- a/mlir/examples/toy/Ch5/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch5/mlir/Dialect.cpp @@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() { /// Set the callee for the generic call operation, this is required by the call /// interface. void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) { - (*this)->setAttr("callee", callee.get()); + (*this)->setAttr("callee", cast(callee)); } /// Get the argument operands to the called function, this is required by the diff --git a/mlir/examples/toy/Ch6/mlir/Dialect.cpp b/mlir/examples/toy/Ch6/mlir/Dialect.cpp index 72072f9188bf3..fb7c742a01802 100644 --- a/mlir/examples/toy/Ch6/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch6/mlir/Dialect.cpp @@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() { /// Set the callee for the generic call operation, this is required by the call /// interface. void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) { - (*this)->setAttr("callee", callee.get()); + (*this)->setAttr("callee", cast(callee)); } /// Get the argument operands to the called function, this is required by the diff --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp index 7e030ffc5488c..55c44c45e0f00 100644 --- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp @@ -367,7 +367,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() { /// Set the callee for the generic call operation, this is required by the call /// interface. void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) { - (*this)->setAttr("callee", callee.get()); + (*this)->setAttr("callee", cast(callee)); } /// Get the argument operands to the called function, this is required by the