Skip to content

Commit 0f28e40

Browse files
authored
Rollup merge of #104880 - krasimirgg:llvm-16-ctx, r=cuviper
[llvm-wrapper] adapt for LLVM API change Adapt for the LLVM API changes from llvm/llvm-project@721f975. Found via our experimental rust + llvm @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/15203#0184ae73-5169-4b9b-92f4-d4e6e9b86ad9/194-531
2 parents 1fc83ae + e5ccd27 commit 0f28e40

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
@@ -627,7 +627,11 @@ LLVMRustOptimize(
627627
bool DebugPassManager = false;
628628

629629
PassInstrumentationCallbacks PIC;
630+
#if LLVM_VERSION_LT(16, 0)
630631
StandardInstrumentations SI(DebugPassManager);
632+
#else
633+
StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
634+
#endif
631635
SI.registerCallbacks(PIC);
632636

633637
if (LlvmSelfProfiler){

0 commit comments

Comments
 (0)