aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit_wrap.cpp
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-10-18 22:15:54 +1300
committerThomas Munro <tmunro@postgresql.org>2023-10-19 05:13:23 +1300
commit76200e5ee469e4a9db5f9514b9d0c6a31b496bff (patch)
treee53fbab31a74ff9d9e0c5ee8e741d4c14961a009 /src/backend/jit/llvm/llvmjit_wrap.cpp
parentf90b4a846b32d3d6d2fd9d55a93735501e4c34fd (diff)
downloadpostgresql-76200e5ee469e4a9db5f9514b9d0c6a31b496bff.tar.gz
postgresql-76200e5ee469e4a9db5f9514b9d0c6a31b496bff.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.cpp6
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 cb896e2b6a5..90a41b91912 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"