[Mlir-commits] [mlir] [MLIR][LLVMIR] Import calls with mismatching signature as indirect call (PR #135895)
Christian Ulmann
llvmlistbot at llvm.org
Thu May 1 22:56:17 PDT 2025
================
@@ -1771,11 +1773,17 @@ ModuleImport::convertFunctionType(llvm::CallBase *callInst) {
if (failed(calleeType))
return failure();
- // Compare the types to avoid constructing illegal call/invoke operations.
- if (failed(verifyFunctionTypeCompatibility(*callType, *calleeType))) {
+ // Compare the types, if they are not compatible, avoid illegal call/invoke
+ // operations by issuing an indirect call. Note that LLVM IR currently
+ // supports this usage.
+ if (failed(checkFunctionTypeCompatibility(*callType, *calleeType))) {
Location loc = translateLoc(callInst->getDebugLoc());
- return emitError(loc) << "incompatible call and callee types: " << *callType
----------------
Dinistro wrote:
Was there no test that covered this? 👀
https://github.com/llvm/llvm-project/pull/135895
More information about the Mlir-commits
mailing list