@@ -7,7 +7,7 @@ use std::sync::Arc;
7
7
use std:: { io, iter, slice} ;
8
8
9
9
use object:: read:: archive:: ArchiveFile ;
10
- use rustc_codegen_ssa:: back:: lto:: { LtoModuleCodegen , SerializedModule , ThinModule , ThinShared } ;
10
+ use rustc_codegen_ssa:: back:: lto:: { SerializedModule , ThinModule , ThinShared } ;
11
11
use rustc_codegen_ssa:: back:: symbol_export;
12
12
use rustc_codegen_ssa:: back:: write:: { CodegenContext , FatLtoInput } ;
13
13
use rustc_codegen_ssa:: traits:: * ;
@@ -201,7 +201,7 @@ pub(crate) fn run_fat(
201
201
cgcx : & CodegenContext < LlvmCodegenBackend > ,
202
202
modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
203
203
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
204
- ) -> Result < LtoModuleCodegen < LlvmCodegenBackend > , FatalError > {
204
+ ) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
205
205
let dcx = cgcx. create_dcx ( ) ;
206
206
let dcx = dcx. handle ( ) ;
207
207
let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
@@ -217,7 +217,7 @@ pub(crate) fn run_thin(
217
217
cgcx : & CodegenContext < LlvmCodegenBackend > ,
218
218
modules : Vec < ( String , ThinBuffer ) > ,
219
219
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
220
- ) -> Result < ( Vec < LtoModuleCodegen < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
220
+ ) -> Result < ( Vec < ThinModule < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
221
221
let dcx = cgcx. create_dcx ( ) ;
222
222
let dcx = dcx. handle ( ) ;
223
223
let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
@@ -248,7 +248,7 @@ fn fat_lto(
248
248
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
249
249
mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
250
250
symbols_below_threshold : & [ * const libc:: c_char ] ,
251
- ) -> Result < LtoModuleCodegen < LlvmCodegenBackend > , FatalError > {
251
+ ) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
252
252
let _timer = cgcx. prof . generic_activity ( "LLVM_fat_lto_build_monolithic_module" ) ;
253
253
info ! ( "going for a fat lto" ) ;
254
254
@@ -366,7 +366,7 @@ fn fat_lto(
366
366
save_temp_bitcode ( cgcx, & module, "lto.after-restriction" ) ;
367
367
}
368
368
369
- Ok ( LtoModuleCodegen :: Fat ( module) )
369
+ Ok ( module)
370
370
}
371
371
372
372
pub ( crate ) struct Linker < ' a > ( & ' a mut llvm:: Linker < ' a > ) ;
@@ -436,7 +436,7 @@ fn thin_lto(
436
436
serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
437
437
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
438
438
symbols_below_threshold : & [ * const libc:: c_char ] ,
439
- ) -> Result < ( Vec < LtoModuleCodegen < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
439
+ ) -> Result < ( Vec < ThinModule < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
440
440
let _timer = cgcx. prof . generic_activity ( "LLVM_thin_lto_global_analysis" ) ;
441
441
unsafe {
442
442
info ! ( "going for that thin, thin LTO" ) ;
@@ -568,10 +568,7 @@ fn thin_lto(
568
568
}
569
569
570
570
info ! ( " - {}: re-compiled" , module_name) ;
571
- opt_jobs. push ( LtoModuleCodegen :: Thin ( ThinModule {
572
- shared : Arc :: clone ( & shared) ,
573
- idx : module_index,
574
- } ) ) ;
571
+ opt_jobs. push ( ThinModule { shared : Arc :: clone ( & shared) , idx : module_index } ) ;
575
572
}
576
573
577
574
// Save the current ThinLTO import information for the next compilation
0 commit comments