@@ -50,7 +50,7 @@ struct LtoData {
5050}
5151
5252fn prepare_lto (
53- cgcx : & CodegenContext < GccCodegenBackend > ,
53+ cgcx : & CodegenContext ,
5454 each_linked_rlib_for_lto : & [ PathBuf ] ,
5555 dcx : DiagCtxtHandle < ' _ > ,
5656) -> LtoData {
@@ -111,7 +111,7 @@ fn save_as_file(obj: &[u8], path: &Path) -> Result<(), LtoBitcodeFromRlib> {
111111/// Performs fat LTO by merging all modules into a single one and returning it
112112/// for further optimization.
113113pub ( crate ) fn run_fat (
114- cgcx : & CodegenContext < GccCodegenBackend > ,
114+ cgcx : & CodegenContext ,
115115 shared_emitter : & SharedEmitter ,
116116 each_linked_rlib_for_lto : & [ PathBuf ] ,
117117 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
@@ -132,7 +132,7 @@ pub(crate) fn run_fat(
132132}
133133
134134fn fat_lto (
135- cgcx : & CodegenContext < GccCodegenBackend > ,
135+ cgcx : & CodegenContext ,
136136 _dcx : DiagCtxtHandle < ' _ > ,
137137 modules : Vec < FatLtoInput < GccCodegenBackend > > ,
138138 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
@@ -283,7 +283,7 @@ impl ModuleBufferMethods for ModuleBuffer {
283283/// lists, one of the modules that need optimization and another for modules that
284284/// can simply be copied over from the incr. comp. cache.
285285pub ( crate ) fn run_thin (
286- cgcx : & CodegenContext < GccCodegenBackend > ,
286+ cgcx : & CodegenContext ,
287287 dcx : DiagCtxtHandle < ' _ > ,
288288 each_linked_rlib_for_lto : & [ PathBuf ] ,
289289 modules : Vec < ( String , ThinBuffer ) > ,
@@ -345,7 +345,7 @@ pub(crate) fn prepare_thin(module: ModuleCodegen<GccContext>) -> (String, ThinBu
345345/// all of the `LtoModuleCodegen` units returned below and destroyed once
346346/// they all go out of scope.
347347fn thin_lto (
348- cgcx : & CodegenContext < GccCodegenBackend > ,
348+ cgcx : & CodegenContext ,
349349 _dcx : DiagCtxtHandle < ' _ > ,
350350 modules : Vec < ( String , ThinBuffer ) > ,
351351 serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
@@ -520,11 +520,9 @@ fn thin_lto(
520520
521521pub fn optimize_thin_module (
522522 thin_module : ThinModule < GccCodegenBackend > ,
523- _cgcx : & CodegenContext < GccCodegenBackend > ,
523+ _cgcx : & CodegenContext ,
524524) -> ModuleCodegen < GccContext > {
525525 //let module_name = &thin_module.shared.module_names[thin_module.idx];
526- /*let tm_factory_config = TargetMachineFactoryConfig::new(cgcx, module_name.to_str().unwrap());
527- let tm = (cgcx.tm_factory)(tm_factory_config).map_err(|e| write::llvm_err(&dcx, e))?;*/
528526
529527 // Right now the implementation we've got only works over serialized
530528 // modules, so we create a fresh new LLVM context and parse the module
0 commit comments