Skip to content

Commit a0c5079

Browse files
committed
llvm-wrapper: adapt for LLVM API change
LLVM commit llvm/llvm-project@1d608fc renamed the pass.
1 parent c13187c commit a0c5079

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,11 @@ LLVMRustOptimize(
841841
// cargo run tests in multhreading mode by default
842842
// so use atomics for coverage counters
843843
Options.Atomic = true;
844+
#if LLVM_VERSION_GE(18, 0)
845+
MPM.addPass(InstrProfilingLoweringPass(Options, false));
846+
#else
844847
MPM.addPass(InstrProfiling(Options, false));
848+
#endif
845849
}
846850
);
847851
}

0 commit comments

Comments
 (0)