Skip to content

Commit e5ccd27

Browse files
committedNov 25, 2022
[llvm-wrapper] adapt for LLVM API change
Adapt for the LLVM API changes from llvm/llvm-project@721f975#diff-5a347903b8412ed1b1b1948c3fce47f9a6ff05dc70bfaeedb6d06b622e399d91.
1 parent 41e0363 commit e5ccd27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

Diff for: ‎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)