mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 15:05:19 +00:00
aot: Fix LLVMSetTailCallKind check (#3099)
This commit is contained in:
parent
170ae35131
commit
7e65f9a244
|
@ -533,18 +533,12 @@ aot_add_precheck_function(AOTCompContext *comp_ctx, LLVMModuleRef module,
|
|||
}
|
||||
wasm_runtime_free(params);
|
||||
params = NULL;
|
||||
|
||||
#if LLVM_VERSION_MAJOR < 17
|
||||
if (aot_target_precheck_can_use_musttail(comp_ctx)) {
|
||||
LLVMSetTailCallKind(retval, LLVMTailCallKindMustTail);
|
||||
}
|
||||
else {
|
||||
LLVMSetTailCallKind(retval, LLVMTailCallKindTail);
|
||||
}
|
||||
#else
|
||||
LLVMSetTailCall(retval, true);
|
||||
#endif
|
||||
|
||||
if (ret_type == VOID_TYPE) {
|
||||
if (!LLVMBuildRetVoid(b)) {
|
||||
goto fail;
|
||||
|
|
|
@ -163,7 +163,7 @@ LLVMCreateTargetMachineWithOpts(LLVMTargetRef ctarget, const char *triple,
|
|||
}
|
||||
|
||||
/* https://reviews.llvm.org/D153107 */
|
||||
#if LLVM_VERSION_MAJOR < 17
|
||||
#if LLVM_VERSION_MAJOR < 18
|
||||
using namespace llvm;
|
||||
|
||||
LLVMTailCallKind
|
||||
|
|
|
@ -17,7 +17,7 @@ LLVMCreateTargetMachineWithOpts(LLVMTargetRef ctarget, const char *triple,
|
|||
const char *StackUsageOutput);
|
||||
|
||||
/* https://reviews.llvm.org/D153107 */
|
||||
#if LLVM_VERSION_MAJOR < 17
|
||||
#if LLVM_VERSION_MAJOR < 18
|
||||
typedef enum {
|
||||
LLVMTailCallKindNone = 0,
|
||||
LLVMTailCallKindTail = 1,
|
||||
|
|
Loading…
Reference in New Issue
Block a user