@@ -24,7 +24,7 @@ use std::sync::Arc;
2424
2525use gccjit:: { Context , OutputKind } ;
2626use object:: read:: archive:: ArchiveFile ;
27- use rustc_codegen_ssa:: back:: lto:: { LtoModuleCodegen , SerializedModule , ThinModule , ThinShared } ;
27+ use rustc_codegen_ssa:: back:: lto:: { SerializedModule , ThinModule , ThinShared } ;
2828use rustc_codegen_ssa:: back:: symbol_export;
2929use rustc_codegen_ssa:: back:: write:: { CodegenContext , FatLtoInput } ;
3030use rustc_codegen_ssa:: traits:: * ;
@@ -176,7 +176,7 @@ pub(crate) fn run_fat(
176176 cgcx : & CodegenContext < GccCodegenBackend > ,
177177 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
178178 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
179- ) -> Result < LtoModuleCodegen < GccCodegenBackend > , FatalError > {
179+ ) -> Result < ModuleCodegen < GccContext > , FatalError > {
180180 let dcx = cgcx. create_dcx ( ) ;
181181 let dcx = dcx. handle ( ) ;
182182 let lto_data = prepare_lto ( cgcx, dcx) ?;
@@ -201,7 +201,7 @@ fn fat_lto(
201201 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
202202 tmp_path : TempDir ,
203203 //symbols_below_threshold: &[String],
204- ) -> Result < LtoModuleCodegen < GccCodegenBackend > , FatalError > {
204+ ) -> Result < ModuleCodegen < GccContext > , FatalError > {
205205 let _timer = cgcx. prof . generic_activity ( "GCC_fat_lto_build_monolithic_module" ) ;
206206 info ! ( "going for a fat lto" ) ;
207207
@@ -334,7 +334,7 @@ fn fat_lto(
334334 // of now.
335335 module. module_llvm . temp_dir = Some ( tmp_path) ;
336336
337- Ok ( LtoModuleCodegen :: Fat ( module) )
337+ Ok ( module)
338338}
339339
340340pub struct ModuleBuffer ( PathBuf ) ;
@@ -358,7 +358,7 @@ pub(crate) fn run_thin(
358358 cgcx : & CodegenContext < GccCodegenBackend > ,
359359 modules : Vec < ( String , ThinBuffer ) > ,
360360 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
361- ) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
361+ ) -> Result < ( Vec < ThinModule < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
362362 let dcx = cgcx. create_dcx ( ) ;
363363 let dcx = dcx. handle ( ) ;
364364 let lto_data = prepare_lto ( cgcx, dcx) ?;
@@ -427,7 +427,7 @@ fn thin_lto(
427427 tmp_path : TempDir ,
428428 cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
429429 //_symbols_below_threshold: &[String],
430- ) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
430+ ) -> Result < ( Vec < ThinModule < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
431431 let _timer = cgcx. prof . generic_activity ( "LLVM_thin_lto_global_analysis" ) ;
432432 info ! ( "going for that thin, thin LTO" ) ;
433433
@@ -573,8 +573,7 @@ fn thin_lto(
573573 }*/
574574
575575 info ! ( " - {}: re-compiled" , module_name) ;
576- opt_jobs
577- . push ( LtoModuleCodegen :: Thin ( ThinModule { shared : shared. clone ( ) , idx : module_index } ) ) ;
576+ opt_jobs. push ( ThinModule { shared : shared. clone ( ) , idx : module_index } ) ;
578577 }
579578
580579 // Save the current ThinLTO import information for the next compilation
0 commit comments