Skip to content

Commit e74e7bd

Browse files
Use resolveCallableInTable to cleanup getCalledFunction
1 parent 466c526 commit e74e7bd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,7 @@ getBufferizedFunctionArgType(FuncOp funcOp, int64_t index,
9595
/// Return the FuncOp called by `callOp`.
9696
static FuncOp getCalledFunction(CallOpInterface callOp,
9797
SymbolTableCollection &symbolTables) {
98-
SymbolRefAttr sym =
99-
llvm::dyn_cast_if_present<SymbolRefAttr>(callOp.getCallableForCallee());
100-
if (!sym)
101-
return nullptr;
102-
return dyn_cast_or_null<FuncOp>(
103-
symbolTables.lookupNearestSymbolFrom(callOp, sym));
98+
return dyn_cast_or_null<FuncOp>(callOp.resolveCallableInTable(&symbolTables));
10499
}
105100

106101
/// Return the FuncOp called by `callOp`.

0 commit comments

Comments
 (0)