Skip to content

Commit c613122

Browse files
committed
PassWrapper: adapt for llvm/llvm-project@5445edb5d
As with ab5583e, we had been explicitly passing defaults whose type have changed. Rather than do an ifdef, we simply rely on the defaults. @rustbot label: +llvm-main
1 parent 00ed73c commit c613122

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -777,10 +777,8 @@ extern "C" LLVMRustResult LLVMRustOptimize(
777777
CGSCCAnalysisManager CGAM;
778778
ModuleAnalysisManager MAM;
779779

780-
// FIXME: We may want to expose this as an option.
781-
bool DebugPassManager = false;
782-
783-
StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
780+
StandardInstrumentations SI(TheModule->getContext(),
781+
/*DebugLogging=*/false);
784782
SI.registerCallbacks(PIC, &MAM);
785783

786784
if (LLVMPluginsLen) {
@@ -932,8 +930,9 @@ extern "C" LLVMRustResult LLVMRustOptimize(
932930
for (const auto &C : OptimizerLastEPCallbacks)
933931
PB.registerOptimizerLastEPCallback(C);
934932

935-
// Pass false as we manually schedule ThinLTOBufferPasses below.
936-
MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ false);
933+
// We manually schedule ThinLTOBufferPasses below, so don't pass the value
934+
// to enable it here.
935+
MPM = PB.buildO0DefaultPipeline(OptLevel);
937936
} else {
938937
for (const auto &C : PipelineStartEPCallbacks)
939938
PB.registerPipelineStartEPCallback(C);
@@ -942,7 +941,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
942941

943942
switch (OptStage) {
944943
case LLVMRustOptStage::PreLinkNoLTO:
945-
MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager);
944+
MPM = PB.buildPerModuleDefaultPipeline(OptLevel);
946945
break;
947946
case LLVMRustOptStage::PreLinkThinLTO:
948947
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);

0 commit comments

Comments
 (0)