aot compiler: Some updates for LLVM 18 (#2981)

Note: This commit includes copy-and-paste from LLVM and thus adds
the LLVM copyright notice.

cf. 0a1aa6cda2
cf. a1e9777b76
cf. 56c72c7f33
This commit is contained in:
YAMAMOTO Takashi
2024-01-08 11:15:31 +09:00
committed by GitHub
parent c39214e8a5
commit 722381fcf2
3 changed files with 50 additions and 1 deletions

View File

@ -409,7 +409,10 @@ aot_compress_aot_func_names(AOTCompContext *comp_ctx, uint32 *p_size)
NameStrs.push_back(str);
}
if (collectPGOFuncNameStrings(NameStrs, true, Result)) {
#if LLVM_VERSION_MAJOR < 18
#define collectGlobalObjectNameStrings collectPGOFuncNameStrings
#endif
if (collectGlobalObjectNameStrings(NameStrs, true, Result)) {
aot_set_last_error("collect pgo func name strings failed");
return NULL;
}