Rollup merge of #118818 - krasimirgg:llvm-18-pass, r=nikic

llvm-wrapper: adapt for LLVM API change

LLVM commit 1d608fc755 renamed the pass.

r? ````@nikic````
This commit is contained in:
Matthias Krüger 2023-12-11 20:46:50 +01:00 committed by GitHub
commit dadecea9f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
);
}