Support LLVM >=17.0.1 on Darwin and Linux

This commit is contained in:
jcmdln
2023-10-11 21:06:42 -04:00
parent 0c10b951a9
commit bd86cb22e0
4 changed files with 33 additions and 7 deletions
+4
View File
@@ -15,6 +15,9 @@
#include <llvm-c/Object.h>
#include <llvm-c/BitWriter.h>
#include <llvm-c/DebugInfo.h>
#if LLVM_VERSION_MAJOR >= 17 && (LLVM_VERSION_MINOR > 0 || (LLVM_VERSION_MINOR == 0 && LLVM_VERSION_PATCH > 0))
#include <llvm-c/Transforms/PassBuilder.h>
#else
#include <llvm-c/Transforms/AggressiveInstCombine.h>
#include <llvm-c/Transforms/InstCombine.h>
#include <llvm-c/Transforms/IPO.h>
@@ -23,6 +26,7 @@
#include <llvm-c/Transforms/Utils.h>
#include <llvm-c/Transforms/Vectorize.h>
#endif
#endif
#if LLVM_VERSION_MAJOR < 11
#error "LLVM Version 11 is the minimum required"