Skip to content

Commit 7e65f9a

Browse files
authored
aot: Fix LLVMSetTailCallKind check (#3099)
1 parent 170ae35 commit 7e65f9a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

core/iwasm/compilation/aot_llvm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,18 +533,12 @@ aot_add_precheck_function(AOTCompContext *comp_ctx, LLVMModuleRef module,
533533
}
534534
wasm_runtime_free(params);
535535
params = NULL;
536-
537-
#if LLVM_VERSION_MAJOR < 17
538536
if (aot_target_precheck_can_use_musttail(comp_ctx)) {
539537
LLVMSetTailCallKind(retval, LLVMTailCallKindMustTail);
540538
}
541539
else {
542540
LLVMSetTailCallKind(retval, LLVMTailCallKindTail);
543541
}
544-
#else
545-
LLVMSetTailCall(retval, true);
546-
#endif
547-
548542
if (ret_type == VOID_TYPE) {
549543
if (!LLVMBuildRetVoid(b)) {
550544
goto fail;

core/iwasm/compilation/aot_llvm_extra2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ LLVMCreateTargetMachineWithOpts(LLVMTargetRef ctarget, const char *triple,
163163
}
164164

165165
/* https://reviews.llvm.org/D153107 */
166-
#if LLVM_VERSION_MAJOR < 17
166+
#if LLVM_VERSION_MAJOR < 18
167167
using namespace llvm;
168168

169169
LLVMTailCallKind

core/iwasm/compilation/aot_llvm_extra2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LLVMCreateTargetMachineWithOpts(LLVMTargetRef ctarget, const char *triple,
1717
const char *StackUsageOutput);
1818

1919
/* https://reviews.llvm.org/D153107 */
20-
#if LLVM_VERSION_MAJOR < 17
20+
#if LLVM_VERSION_MAJOR < 18
2121
typedef enum {
2222
LLVMTailCallKindNone = 0,
2323
LLVMTailCallKindTail = 1,

0 commit comments

Comments
 (0)