diff options
| author | Krasimir Georgiev <krasimir@google.com> | 2022-11-25 11:29:00 +0000 |
|---|---|---|
| committer | Krasimir Georgiev <krasimir@google.com> | 2022-11-25 11:29:00 +0000 |
| commit | e5ccd27e679d44e9251bc7f5a879f14c23eb8c25 (patch) | |
| tree | 67d4327e17b8956acf2912c8576d8c77f8f74ae6 /compiler/rustc_llvm | |
| parent | 41e0363055ade59584cff667c79f64937e6ef3f9 (diff) | |
| download | rust-e5ccd27e679d44e9251bc7f5a879f14c23eb8c25.tar.gz rust-e5ccd27e679d44e9251bc7f5a879f14c23eb8c25.zip | |
[llvm-wrapper] adapt for LLVM API change
Adapt for the LLVM API changes from https://github.com/llvm/llvm-project/commit/721f975d3518403502f770ce11f3f02509b30c5b#diff-5a347903b8412ed1b1b1948c3fce47f9a6ff05dc70bfaeedb6d06b622e399d91.
Diffstat (limited to 'compiler/rustc_llvm')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 5f02bb6c307..7f4d63eed8b 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -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){ |
