@@ -7,7 +7,7 @@ use std::sync::Arc;
77use std:: { io, iter, slice} ;
88
99use 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 } ;
1111use rustc_codegen_ssa:: back:: symbol_export;
1212use rustc_codegen_ssa:: back:: write:: { CodegenContext , FatLtoInput } ;
1313use rustc_codegen_ssa:: traits:: * ;
@@ -201,7 +201,7 @@ pub(crate) fn run_fat(
201201 cgcx : & CodegenContext < LlvmCodegenBackend > ,
202202 modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
203203 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
204- ) -> Result < LtoModuleCodegen < LlvmCodegenBackend > , FatalError > {
204+ ) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
205205 let dcx = cgcx. create_dcx ( ) ;
206206 let dcx = dcx. handle ( ) ;
207207 let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
@@ -217,7 +217,7 @@ pub(crate) fn run_thin(
217217 cgcx : & CodegenContext < LlvmCodegenBackend > ,
218218 modules : Vec < ( String , ThinBuffer ) > ,
219219 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
220- ) -> Result < ( Vec < LtoModuleCodegen < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
220+ ) -> Result < ( Vec < ThinModule < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
221221 let dcx = cgcx. create_dcx ( ) ;
222222 let dcx = dcx. handle ( ) ;
223223 let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
@@ -248,7 +248,7 @@ fn fat_lto(
248248 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
249249 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
250250 symbols_below_threshold : & [ * const libc:: c_char ] ,
251- ) -> Result < LtoModuleCodegen < LlvmCodegenBackend > , FatalError > {
251+ ) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
252252 let _timer = cgcx. prof . generic_activity ( "LLVM_fat_lto_build_monolithic_module" ) ;
253253 info ! ( "going for a fat lto" ) ;
254254
@@ -366,7 +366,7 @@ fn fat_lto(
366366 save_temp_bitcode ( cgcx, & module, "lto.after-restriction" ) ;
367367 }
368368
369- Ok ( LtoModuleCodegen :: Fat ( module) )
369+ Ok ( module)
370370}
371371
372372pub ( crate ) struct Linker < ' a > ( & ' a mut llvm:: Linker < ' a > ) ;
@@ -436,7 +436,7 @@ fn thin_lto(
436436 serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
437437 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
438438 symbols_below_threshold : & [ * const libc:: c_char ] ,
439- ) -> Result < ( Vec < LtoModuleCodegen < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
439+ ) -> Result < ( Vec < ThinModule < LlvmCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
440440 let _timer = cgcx. prof . generic_activity ( "LLVM_thin_lto_global_analysis" ) ;
441441 unsafe {
442442 info ! ( "going for that thin, thin LTO" ) ;
@@ -568,10 +568,7 @@ fn thin_lto(
568568 }
569569
570570 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 } ) ;
575572 }
576573
577574 // Save the current ThinLTO import information for the next compilation
0 commit comments