[llvm-wrapper] adapt for LLVM API change

Adapt for the LLVM API changes from
721f975d35 (diff-5a347903b8412ed1b1b1948c3fce47f9a6ff05dc70bfaeedb6d06b622e399d91).
This commit is contained in:
Krasimir Georgiev 2022-11-25 11:29:00 +00:00
parent 41e0363055
commit e5ccd27e67

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