Skip to content

Commit

Permalink
Fix LLVM 20 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Nov 3, 2024
1 parent 4be5c74 commit 15803eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wrapper/src/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 15803eb

Please sign in to comment.