llvm-wrapper: adapt for LLVM API change

LLVM commit 1d608fc755
renamed the pass.
This commit is contained in:
Krasimir Georgiev 2023-12-11 09:27:09 +00:00
parent c13187c998
commit a0c5079889
1 changed files with 4 additions and 0 deletions

View File

@ -841,7 +841,11 @@ LLVMRustOptimize(
// cargo run tests in multhreading mode by default
// so use atomics for coverage counters
Options.Atomic = true;
#if LLVM_VERSION_GE(18, 0)
MPM.addPass(InstrProfilingLoweringPass(Options, false));
#else
MPM.addPass(InstrProfiling(Options, false));
#endif
}
);
}