LLVM 16 provided a new function name[1], and LLVM 18 (not shipped yet) has started complaining[2] about the old spelling.
Here's a patch. [1] https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242 [2] https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9
From bc2a07e0012aa58af2cf97a202d181f473a4d7bc Mon Sep 17 00:00:00 2001 From: Thomas Munro <thomas.mu...@gmail.com> Date: Wed, 3 Jan 2024 17:45:30 +1300 Subject: [PATCH] Track LLVM 18 changes. https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242 https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9 diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp index d92d7f3c88..17c0aa427a 100644 --- a/src/backend/jit/llvm/llvmjit_inline.cpp +++ b/src/backend/jit/llvm/llvmjit_inline.cpp @@ -821,7 +821,10 @@ static void add_module_to_inline_search_path(InlineSearchPath& searchpath, llvm::StringRef modpath) { /* only extension in libdir are candidates for inlining for now */ - if (!modpath.startswith("$libdir/")) +#if LLVM_VERSION_MAJOR < 16 +#define starts_with startswith +#endif + if (!modpath.starts_with("$libdir/")) return; /* if there's no match, attempt to load */ -- 2.39.2