diff options
author | Thomas Munro <tmunro@postgresql.org> | 2023-10-18 22:15:54 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2023-10-19 05:16:00 +1300 |
commit | 0a8b7d5c11266ba5291d0aafc0ff4f92ab1cc041 (patch) | |
tree | 0b2ef9c3812126dfa60906c9c6a5b893b11350bb /src/backend/jit/llvm/llvmjit_wrap.cpp | |
parent | ee3e4c41f35449c3cffc05a4b7738940075d9c28 (diff) | |
download | postgresql-0a8b7d5c11266ba5291d0aafc0ff4f92ab1cc041.tar.gz postgresql-0a8b7d5c11266ba5291d0aafc0ff4f92ab1cc041.zip |
jit: Changes for LLVM 17.
Changes required by https://llvm.org/docs/NewPassManager.html.
Back-patch to 12, leaving the final release of 11 unchanged, consistent
with earlier decision not to back-patch LLVM 16 support either.
Author: Dmitry Dolgov <9erthalion6@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2BWXznXCyTgCADd%3DHWkP9Qksa6chd7L%3DGCnZo-MBgg9Lg%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_wrap.cpp')
-rw-r--r-- | src/backend/jit/llvm/llvmjit_wrap.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/jit/llvm/llvmjit_wrap.cpp b/src/backend/jit/llvm/llvmjit_wrap.cpp index 8008b9abd06..2962083c50f 100644 --- a/src/backend/jit/llvm/llvmjit_wrap.cpp +++ b/src/backend/jit/llvm/llvmjit_wrap.cpp @@ -23,8 +23,14 @@ extern "C" #include <llvm/IR/Attributes.h> #include <llvm/IR/Function.h> +#if LLVM_VERSION_MAJOR < 17 #include <llvm/MC/SubtargetFeature.h> +#endif +#if LLVM_VERSION_MAJOR > 16 +#include <llvm/TargetParser/Host.h> +#else #include <llvm/Support/Host.h> +#endif #include "jit/llvmjit.h" |