Skip to content

Commit 2655ae5

Browse files
authored
[mlir] Fix deprecated pointer union casts in toy example (#124422)
1 parent d578d0b commit 2655ae5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

mlir/examples/toy/Ch4/mlir/Dialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() {
333333
/// Set the callee for the generic call operation, this is required by the call
334334
/// interface.
335335
void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) {
336-
(*this)->setAttr("callee", callee.get<SymbolRefAttr>());
336+
(*this)->setAttr("callee", cast<SymbolRefAttr>(callee));
337337
}
338338

339339
/// Get the argument operands to the called function, this is required by the

mlir/examples/toy/Ch5/mlir/Dialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() {
333333
/// Set the callee for the generic call operation, this is required by the call
334334
/// interface.
335335
void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) {
336-
(*this)->setAttr("callee", callee.get<SymbolRefAttr>());
336+
(*this)->setAttr("callee", cast<SymbolRefAttr>(callee));
337337
}
338338

339339
/// Get the argument operands to the called function, this is required by the

mlir/examples/toy/Ch6/mlir/Dialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() {
333333
/// Set the callee for the generic call operation, this is required by the call
334334
/// interface.
335335
void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) {
336-
(*this)->setAttr("callee", callee.get<SymbolRefAttr>());
336+
(*this)->setAttr("callee", cast<SymbolRefAttr>(callee));
337337
}
338338

339339
/// Get the argument operands to the called function, this is required by the

mlir/examples/toy/Ch7/mlir/Dialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ CallInterfaceCallable GenericCallOp::getCallableForCallee() {
367367
/// Set the callee for the generic call operation, this is required by the call
368368
/// interface.
369369
void GenericCallOp::setCalleeFromCallable(CallInterfaceCallable callee) {
370-
(*this)->setAttr("callee", callee.get<SymbolRefAttr>());
370+
(*this)->setAttr("callee", cast<SymbolRefAttr>(callee));
371371
}
372372

373373
/// Get the argument operands to the called function, this is required by the

0 commit comments

Comments
 (0)