Fix LLVM 20 compilation

This commit is contained in:
Christoffer Lerno
2024-11-03 23:25:28 +01:00
committed by Christoffer Lerno
parent 4be5c74798
commit ba34b45651

View File

@@ -191,8 +191,11 @@ bool llvm_run_passes(LLVMModuleRef m, LLVMTargetMachineRef tm,
default:
exit(-1);
}
#if LLVM_VERSION_MAJOR > 19
llvm::ModulePassManager MPM = PB.buildPerModuleDefaultPipeline(level, llvm::ThinOrFullLTOPhase::None);
#else
llvm::ModulePassManager MPM = PB.buildPerModuleDefaultPipeline(level, false);
#endif
if (passes->should_verify)
{
MPM.addPass(llvm::VerifierPass());