]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Rollup merge of #104936 - cjgillot:self-rpit-orig-too, r=oli-obk
[rust.git] / compiler / rustc_llvm / llvm-wrapper / PassWrapper.cpp
index 5f02bb6c3070f7d5b93cf9f781dbf77562e07eab..7f4d63eed8bdf225c8e3ea7ea7d3a17a80f790ed 100644 (file)
@@ -627,7 +627,11 @@ LLVMRustOptimize(
   bool DebugPassManager = false;
 
   PassInstrumentationCallbacks PIC;
+#if LLVM_VERSION_LT(16, 0)
   StandardInstrumentations SI(DebugPassManager);
+#else
+  StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
+#endif
   SI.registerCallbacks(PIC);
 
   if (LlvmSelfProfiler){