Skip to content

Commit

Permalink
llvm-wrapper: adapt for LLVM API change
Browse files Browse the repository at this point in the history
LLVM commit llvm/llvm-project@1d608fc
renamed the pass.
  • Loading branch information
krasimirgg committed Dec 11, 2023
1 parent c13187c commit a0c5079
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 a0c5079

Please sign in to comment.