Skip to content

Commit 00bb9fc

Browse files
committed
Rename LLVM optimize functions
1 parent 29124c7 commit 00bb9fc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/rustc_codegen_llvm/src/back/lto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ pub(crate) fn run_pass_manager(
597597
}
598598
let opt_stage = if thin { llvm::OptStage::ThinLTO } else { llvm::OptStage::FatLTO };
599599
let opt_level = config.opt_level.unwrap_or(config::OptLevel::No);
600-
write::optimize(cgcx, diag_handler, module, config, opt_level, opt_stage)?;
600+
write::llvm_optimize(cgcx, diag_handler, module, config, opt_level, opt_stage)?;
601601
}
602602
debug!("lto done");
603603
Ok(())

compiler/rustc_codegen_llvm/src/back/write.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ fn get_instr_profile_output_path(config: &ModuleConfig) -> Option<CString> {
416416
}
417417
}
418418

419-
pub(crate) unsafe fn optimize(
419+
pub(crate) unsafe fn llvm_optimize(
420420
cgcx: &CodegenContext<LlvmCodegenBackend>,
421421
diag_handler: &Handler,
422422
module: &ModuleCodegen<ModuleLlvm>,
@@ -498,7 +498,7 @@ pub(crate) unsafe fn optimize(
498498
}
499499

500500
// Unsafe due to LLVM calls.
501-
pub(crate) unsafe fn maybe_optimize(
501+
pub(crate) unsafe fn optimize(
502502
cgcx: &CodegenContext<LlvmCodegenBackend>,
503503
diag_handler: &Handler,
504504
module: &ModuleCodegen<ModuleLlvm>,
@@ -526,7 +526,7 @@ pub(crate) unsafe fn maybe_optimize(
526526
_ if cgcx.opts.cg.linker_plugin_lto.enabled() => llvm::OptStage::PreLinkThinLTO,
527527
_ => llvm::OptStage::PreLinkNoLTO,
528528
};
529-
return optimize(cgcx, diag_handler, module, config, opt_level, opt_stage);
529+
return llvm_optimize(cgcx, diag_handler, module, config, opt_level, opt_stage);
530530
}
531531
Ok(())
532532
}

compiler/rustc_codegen_llvm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
207207
module: &ModuleCodegen<Self::Module>,
208208
config: &ModuleConfig,
209209
) -> Result<(), FatalError> {
210-
back::write::maybe_optimize(cgcx, diag_handler, module, config)
210+
back::write::optimize(cgcx, diag_handler, module, config)
211211
}
212212
fn optimize_fat(
213213
cgcx: &CodegenContext<Self>,

0 commit comments

Comments
 (0)