diff options
author | Thomas Munro <tmunro@postgresql.org> | 2024-01-25 10:37:35 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2024-01-25 13:46:07 +1300 |
commit | 67f7aaa38172155ab2d8a2248e87b5d0b7dc6444 (patch) | |
tree | 4ff334608452a555112eb30ed0db3598e3a5f005 /src | |
parent | ad6fbbeeb07aa40dd3a90b417c0820543d8626eb (diff) | |
download | postgresql-67f7aaa38172155ab2d8a2248e87b5d0b7dc6444.tar.gz postgresql-67f7aaa38172155ab2d8a2248e87b5d0b7dc6444.zip |
Track LLVM 18 changes.
A function was given a newly standard name from C++20 in LLVM 16. Then
LLVM 18 added a deprecation warning for the old name, and it is about to
ship, so it's time to adjust that.
Back-patch to all supported releases.
Discussion: https://www.postgresql.org/message-id/CA+hUKGLbuVhH6mqS8z+FwAn4=5dHs0bAWmEMZ3B+iYHWKC4-ZA@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/jit/llvm/llvmjit_inline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp index 6b46e141fcb..b3382a780fc 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 */ |