diff options
| author | Luqman Aden <me@luqman.ca> | 2022-04-10 15:30:35 -0400 | 
|---|---|---|
| committer | Luqman Aden <me@luqman.ca> | 2022-04-10 15:40:16 -0400 | 
| commit | 84fb481bf51ed69e5cf0780319ba72ead5420732 (patch) | |
| tree | cb8e20ec8a8b947f5d8a39aaaef88dda532262f2 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 18f32b73bdb3833c18c73fe3062bde8e1721ccca (diff) | |
| download | rust-84fb481bf51ed69e5cf0780319ba72ead5420732.tar.gz rust-84fb481bf51ed69e5cf0780319ba72ead5420732.zip  | |
Respect -Z verify-llvm-ir and other flags that add extra passes when combined with -C no-prepopulate-passes in the new LLVM Pass Manager.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 7030fd53704..71f21dc6666 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -995,6 +995,13 @@ LLVMRustOptimizeWithNewPassManager( break; } } + } else { + // We're not building any of the default pipelines but we still want to + // add the verifier, instrumentation, etc passes if they were requested + for (const auto &C : PipelineStartEPCallbacks) + C(MPM, OptLevel); + for (const auto &C : OptimizerLastEPCallbacks) + C(MPM, OptLevel); } if (ExtraPassesLen) {  | 
