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:14:07 +1300
commit774185056834eef7702f6afb37731c583fa51a1a (patch)
tree90026df60d294c33b3cb1858636102110f6eca3b /src/backend/jit/llvm/llvmjit_wrap.cpp
parent60596f148a661e0fd1d7c1f13a72b55124511e3a (diff)
downloadpostgresql-774185056834eef7702f6afb37731c583fa51a1a.tar.gz
postgresql-774185056834eef7702f6afb37731c583fa51a1a.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"