Remove support for LLVM 17 and 18. Update to 0.7.11

This commit is contained in:
Christoffer Lerno
2026-02-26 22:15:34 +01:00
parent 1a3cdc01ec
commit 54ddc9a81c
9 changed files with 20 additions and 38 deletions

View File

@@ -29,7 +29,7 @@
#include "llvm/Transforms/Scalar/JumpThreading.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Analysis/GlobalsModRef.h"
static_assert(LLVM_VERSION_MAJOR >= 17, "Unsupported LLVM version, 17+ is needed.");
static_assert(LLVM_VERSION_MAJOR >= 19, "Unsupported LLVM version, 19+ is needed.");
#define LINK_SIG \
bool link(llvm::ArrayRef<const char *> args, llvm::raw_ostream &stdoutOS, \
@@ -96,9 +96,7 @@ static bool llvm_link(ObjFormat format, const char **args, int arg_count, const
for (int i = 0; i < arg_count; i++) arg_vector.push_back(strdup(args[i]));
std::string output_string {};
std::string output_err_string {};
/*
llvm::raw_string_ostream output { output_string };
llvm::raw_string_ostream output_err { output_err_string };*/
llvm::raw_ostream &output = llvm::outs();
llvm::raw_ostream &output_err = llvm::errs();
bool success;
@@ -154,9 +152,8 @@ bool llvm_run_passes(LLVMModuleRef m, LLVMTargetMachineRef tm, LLVMPasses *passe
PTO.SLPVectorization = passes->opt.slp_vectorize;
PTO.MergeFunctions = passes->opt.merge_functions;
PTO.CallGraphProfile = true; // We always use integrated ASM
#if LLVM_VERSION_MAJOR > 16
PTO.UnifiedLTO = false;
#endif
llvm::PassBuilder PB(Machine, PTO, std::nullopt, &PIC);
llvm::LoopAnalysisManager LAM;