Skip to content

Commit

Permalink
Rollup merge of rust-lang#118818 - krasimirgg:llvm-18-pass, r=nikic
Browse files Browse the repository at this point in the history
llvm-wrapper: adapt for LLVM API change

LLVM commit llvm/llvm-project@1d608fc renamed the pass.

r? ```@nikic```
  • Loading branch information
matthiaskrgr authored Dec 11, 2023
2 parents 88a8504 + a0c5079 commit 97b1009
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
);
}
Expand Down

0 comments on commit 97b1009

Please sign in to comment.