Skip to content

Commit d5e9cc5

Browse files
authored
Rollup merge of #146209 - bjorn3:lto_refactors5, r=dianqk
Misc LTO cleanups Follow up to rust-lang/rust#145955. * Remove want_summary argument from `prepare_thin`. Since rust-lang/rust#133250 ThinLTO summary writing is instead done by `llvm_optimize`. * Two minor cleanups
2 parents fada75d + 79955e1 commit d5e9cc5

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/back/lto.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,9 @@ pub(crate) fn run_thin(
305305
)
306306
}
307307

308-
pub(crate) fn prepare_thin(
309-
module: ModuleCodegen<GccContext>,
310-
_emit_summary: bool,
311-
) -> (String, ThinBuffer) {
308+
pub(crate) fn prepare_thin(module: ModuleCodegen<GccContext>) -> (String, ThinBuffer) {
312309
let name = module.name;
313-
//let buffer = ThinBuffer::new(module.module_llvm.context, true, emit_summary);
310+
//let buffer = ThinBuffer::new(module.module_llvm.context, true);
314311
let buffer = ThinBuffer::new(&module.module_llvm.context);
315312
(name, buffer)
316313
}
@@ -650,10 +647,6 @@ impl ThinBufferMethods for ThinBuffer {
650647
fn data(&self) -> &[u8] {
651648
&[]
652649
}
653-
654-
fn thin_link_data(&self) -> &[u8] {
655-
unimplemented!();
656-
}
657650
}
658651

659652
pub struct ThinData; //(Arc<TempDir>);

src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,8 @@ impl WriteBackendMethods for GccCodegenBackend {
408408
back::write::codegen(cgcx, module, config)
409409
}
410410

411-
fn prepare_thin(
412-
module: ModuleCodegen<Self::Module>,
413-
emit_summary: bool,
414-
) -> (String, Self::ThinBuffer) {
415-
back::lto::prepare_thin(module, emit_summary)
411+
fn prepare_thin(module: ModuleCodegen<Self::Module>) -> (String, Self::ThinBuffer) {
412+
back::lto::prepare_thin(module)
416413
}
417414

418415
fn serialize_module(_module: ModuleCodegen<Self::Module>) -> (String, Self::ModuleBuffer) {

0 commit comments

Comments
 (0)