mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove support for LLVM 17 and 18. Update to 0.7.11
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user