Rollup merge of #146209 - bjorn3:lto_refactors5, r=dianqk
Misc LTO cleanups Follow up to https://github.com/rust-lang/rust/pull/145955. * Remove want_summary argument from `prepare_thin`. Since https://github.com/rust-lang/rust/pull/133250 ThinLTO summary writing is instead done by `llvm_optimize`. * Two minor cleanups
This commit is contained in:
@@ -305,12 +305,9 @@ pub(crate) fn run_thin(
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn prepare_thin(
|
||||
module: ModuleCodegen<GccContext>,
|
||||
_emit_summary: bool,
|
||||
) -> (String, ThinBuffer) {
|
||||
pub(crate) fn prepare_thin(module: ModuleCodegen<GccContext>) -> (String, ThinBuffer) {
|
||||
let name = module.name;
|
||||
//let buffer = ThinBuffer::new(module.module_llvm.context, true, emit_summary);
|
||||
//let buffer = ThinBuffer::new(module.module_llvm.context, true);
|
||||
let buffer = ThinBuffer::new(&module.module_llvm.context);
|
||||
(name, buffer)
|
||||
}
|
||||
@@ -650,10 +647,6 @@ impl ThinBufferMethods for ThinBuffer {
|
||||
fn data(&self) -> &[u8] {
|
||||
&[]
|
||||
}
|
||||
|
||||
fn thin_link_data(&self) -> &[u8] {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThinData; //(Arc<TempDir>);
|
||||
|
||||
@@ -408,11 +408,8 @@ impl WriteBackendMethods for GccCodegenBackend {
|
||||
back::write::codegen(cgcx, module, config)
|
||||
}
|
||||
|
||||
fn prepare_thin(
|
||||
module: ModuleCodegen<Self::Module>,
|
||||
emit_summary: bool,
|
||||
) -> (String, Self::ThinBuffer) {
|
||||
back::lto::prepare_thin(module, emit_summary)
|
||||
fn prepare_thin(module: ModuleCodegen<Self::Module>) -> (String, Self::ThinBuffer) {
|
||||
back::lto::prepare_thin(module)
|
||||
}
|
||||
|
||||
fn serialize_module(_module: ModuleCodegen<Self::Module>) -> (String, Self::ModuleBuffer) {
|
||||
|
||||
Reference in New Issue
Block a user