[Mlir-commits] [mlir] [MLIR][LLVMIR] Import calls with mismatching signature as indirect call (PR #135895)
Bruno Cardoso Lopes
llvmlistbot at llvm.org
Fri May 2 12:57:51 PDT 2025
================
@@ -362,9 +362,13 @@ class ModuleImport {
/// Converts the callee's function type. For direct calls, it converts the
/// actual function type, which may differ from the called operand type in
/// variadic functions. For indirect calls, it converts the function type
- /// associated with the call instruction. Returns failure when the call and
- /// the callee are not compatible or when nested type conversions failed.
- FailureOr<LLVMFunctionType> convertFunctionType(llvm::CallBase *callInst);
+ /// associated with the call instruction. When the call and the callee are not
+ /// compatible (or when nested type conversions failed), emit a warning but
+ /// attempt translation using an indirect call (in order to represent valid
+ /// and verified LLVM IR). The `indirectCallVal` is updated to hold the
+ /// address for the indirect call.
+ FailureOr<LLVMFunctionType> convertFunctionType(llvm::CallBase *callInst,
+ Value &indirectCallVal);
----------------
bcardosolopes wrote:
great idea, done!
https://github.com/llvm/llvm-project/pull/135895
More information about the Mlir-commits
mailing list