diff --git a/wrapper/src/wrapper.cpp b/wrapper/src/wrapper.cpp index a2e8b8bc3..9f0a447f5 100644 --- a/wrapper/src/wrapper.cpp +++ b/wrapper/src/wrapper.cpp @@ -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, ThinOrFullLTOPhase::None); +#else llvm::ModulePassManager MPM = PB.buildPerModuleDefaultPipeline(level, false); - +#endif if (passes->should_verify) { MPM.addPass(llvm::VerifierPass());