Skip to content

Commit 84fb481

Browse files
committed
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.
1 parent 18f32b7 commit 84fb481

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,13 @@ LLVMRustOptimizeWithNewPassManager(
995995
break;
996996
}
997997
}
998+
} else {
999+
// We're not building any of the default pipelines but we still want to
1000+
// add the verifier, instrumentation, etc passes if they were requested
1001+
for (const auto &C : PipelineStartEPCallbacks)
1002+
C(MPM, OptLevel);
1003+
for (const auto &C : OptimizerLastEPCallbacks)
1004+
C(MPM, OptLevel);
9981005
}
9991006

10001007
if (ExtraPassesLen) {

0 commit comments

Comments
 (0)