Rollup merge of #104880 - krasimirgg:llvm-16-ctx, r=cuviper

[llvm-wrapper] adapt for LLVM API change

Adapt for the LLVM API changes from 721f975d35.

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
This commit is contained in:
Matthias Krüger 2022-11-26 10:39:11 +01:00 committed by GitHub
commit 0f28e403d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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){