🌐 AI搜索 & 代理 主页
Skip to content

Commit c11ac81

Browse files
committed
jit: fix build with LLVM-21
LLVM-21 renamed llvm::GlobalValue::getGUID() to getGUIDAssumingExternalLinkage(), so add a version guard. Author: Holger Hoffstätte <holger@applied-asynchrony.com> Discussion: https://www.postgresql.org/message-id/flat/d25e6e4a-d1b4-84d3-2f8a-6c45b975f53d%40applied-asynchrony.com
1 parent 8309f3f commit c11ac81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/jit/llvm/llvmjit_inline.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ llvm_build_inline_plan(LLVMContextRef lc, llvm::Module *mod)
238238

239239
llvm_split_symbol_name(symbolName.data(), &cmodname, &cfuncname);
240240

241+
#if LLVM_VERSION_MAJOR >= 21
242+
funcGUID = llvm::GlobalValue::getGUIDAssumingExternalLinkage(cfuncname);
243+
#else
241244
funcGUID = llvm::GlobalValue::getGUID(cfuncname);
245+
#endif
242246

243247
/* already processed */
244248
if (inlineState.processed)

0 commit comments

Comments
 (0)