diff options
| author | bors <bors@rust-lang.org> | 2022-11-27 19:54:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-27 19:54:04 +0000 |
| commit | f8fbc6da3c467b27793c35c6e105053c9d092447 (patch) | |
| tree | 7dd601ec2ec68fea1cef829a5296be7c3b29a437 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 66354f00430eebb88d33de02326d7ca9196bd61a (diff) | |
| parent | 598c3da62735ec5bc8459ce3f0d718e44ac3e775 (diff) | |
| download | rust-f8fbc6da3c467b27793c35c6e105053c9d092447.tar.gz rust-f8fbc6da3c467b27793c35c6e105053c9d092447.zip | |
Auto merge of #2702 - RalfJung:rustup, r=RalfJung
Rustup No changes happened on the rustc side, but I want to do a push next and would rather make josh's life easier by integrating some recent history first.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 18d37d95a83..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){ @@ -800,7 +804,7 @@ LLVMRustOptimize( auto Plugin = PassPlugin::Load(PluginPath.str()); if (!Plugin) { LLVMRustSetLastError(("Failed to load pass plugin" + PluginPath.str()).c_str()); - continue; + return LLVMRustResult::Failure; } Plugin->registerPassBuilderCallbacks(PB); } |
