@@ -354,7 +354,7 @@ pub struct CodegenContext {
354354 pub parallel : bool ,
355355}
356356
357- fn generate_thin_lto_work < B : ExtraBackendMethods > (
357+ fn generate_thin_lto_work < B : WriteBackendMethods > (
358358 cgcx : & CodegenContext ,
359359 prof : & SelfProfilerRef ,
360360 dcx : DiagCtxtHandle < ' _ > ,
@@ -822,7 +822,7 @@ pub(crate) fn compute_per_cgu_lto_type(
822822 }
823823}
824824
825- fn execute_optimize_work_item < B : ExtraBackendMethods > (
825+ fn execute_optimize_work_item < B : WriteBackendMethods > (
826826 cgcx : & CodegenContext ,
827827 prof : & SelfProfilerRef ,
828828 shared_emitter : SharedEmitter ,
@@ -967,7 +967,7 @@ fn execute_copy_from_cache_work_item(
967967 }
968968}
969969
970- fn do_fat_lto < B : ExtraBackendMethods > (
970+ fn do_fat_lto < B : WriteBackendMethods > (
971971 cgcx : & CodegenContext ,
972972 prof : & SelfProfilerRef ,
973973 shared_emitter : SharedEmitter ,
@@ -999,7 +999,7 @@ fn do_fat_lto<B: ExtraBackendMethods>(
999999 )
10001000}
10011001
1002- fn do_thin_lto < B : ExtraBackendMethods > (
1002+ fn do_thin_lto < B : WriteBackendMethods > (
10031003 cgcx : & CodegenContext ,
10041004 prof : & SelfProfilerRef ,
10051005 shared_emitter : SharedEmitter ,
@@ -1152,7 +1152,7 @@ fn do_thin_lto<B: ExtraBackendMethods>(
11521152 compiled_modules
11531153}
11541154
1155- fn execute_thin_lto_work_item < B : ExtraBackendMethods > (
1155+ fn execute_thin_lto_work_item < B : WriteBackendMethods > (
11561156 cgcx : & CodegenContext ,
11571157 prof : & SelfProfilerRef ,
11581158 shared_emitter : SharedEmitter ,
@@ -1879,7 +1879,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
18791879#[ must_use]
18801880pub ( crate ) struct WorkerFatalError ;
18811881
1882- fn spawn_work < ' a , B : ExtraBackendMethods > (
1882+ fn spawn_work < ' a , B : WriteBackendMethods > (
18831883 cgcx : & CodegenContext ,
18841884 prof : & ' a SelfProfilerRef ,
18851885 shared_emitter : SharedEmitter ,
@@ -1922,7 +1922,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
19221922 std:: thread:: Builder :: new ( ) . name ( name) . spawn ( f) . expect ( "failed to spawn work thread" ) ;
19231923}
19241924
1925- fn spawn_thin_lto_work < B : ExtraBackendMethods > (
1925+ fn spawn_thin_lto_work < B : WriteBackendMethods > (
19261926 cgcx : & CodegenContext ,
19271927 prof : & SelfProfilerRef ,
19281928 shared_emitter : SharedEmitter ,
@@ -2109,20 +2109,20 @@ impl SharedEmitterMain {
21092109 }
21102110}
21112111
2112- pub struct Coordinator < B : ExtraBackendMethods > {
2112+ pub struct Coordinator < B : WriteBackendMethods > {
21132113 sender : Sender < Message < B > > ,
21142114 future : Option < thread:: JoinHandle < Result < MaybeLtoModules < B > , ( ) > > > ,
21152115 // Only used for the Message type.
21162116 phantom : PhantomData < B > ,
21172117}
21182118
2119- impl < B : ExtraBackendMethods > Coordinator < B > {
2119+ impl < B : WriteBackendMethods > Coordinator < B > {
21202120 fn join ( mut self ) -> std:: thread:: Result < Result < MaybeLtoModules < B > , ( ) > > {
21212121 self . future . take ( ) . unwrap ( ) . join ( )
21222122 }
21232123}
21242124
2125- impl < B : ExtraBackendMethods > Drop for Coordinator < B > {
2125+ impl < B : WriteBackendMethods > Drop for Coordinator < B > {
21262126 fn drop ( & mut self ) {
21272127 if let Some ( future) = self . future . take ( ) {
21282128 // If we haven't joined yet, signal to the coordinator that it should spawn no more
@@ -2133,7 +2133,7 @@ impl<B: ExtraBackendMethods> Drop for Coordinator<B> {
21332133 }
21342134}
21352135
2136- pub struct OngoingCodegen < B : ExtraBackendMethods > {
2136+ pub struct OngoingCodegen < B : WriteBackendMethods > {
21372137 pub backend : B ,
21382138 pub output_filenames : Arc < OutputFilenames > ,
21392139 // Field order below is intended to terminate the coordinator thread before two fields below
@@ -2144,7 +2144,7 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
21442144 pub shared_emitter_main : SharedEmitterMain ,
21452145}
21462146
2147- impl < B : ExtraBackendMethods > OngoingCodegen < B > {
2147+ impl < B : WriteBackendMethods > OngoingCodegen < B > {
21482148 pub fn join ( self , sess : & Session ) -> ( CompiledModules , FxIndexMap < WorkProductId , WorkProduct > ) {
21492149 self . shared_emitter_main . check ( sess, true ) ;
21502150
@@ -2267,7 +2267,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
22672267 }
22682268}
22692269
2270- pub ( crate ) fn submit_codegened_module_to_llvm < B : ExtraBackendMethods > (
2270+ pub ( crate ) fn submit_codegened_module_to_llvm < B : WriteBackendMethods > (
22712271 coordinator : & Coordinator < B > ,
22722272 module : ModuleCodegen < B :: Module > ,
22732273 cost : u64 ,
@@ -2276,15 +2276,15 @@ pub(crate) fn submit_codegened_module_to_llvm<B: ExtraBackendMethods>(
22762276 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost } ) ) ;
22772277}
22782278
2279- pub ( crate ) fn submit_post_lto_module_to_llvm < B : ExtraBackendMethods > (
2279+ pub ( crate ) fn submit_post_lto_module_to_llvm < B : WriteBackendMethods > (
22802280 coordinator : & Coordinator < B > ,
22812281 module : CachedModuleCodegen ,
22822282) {
22832283 let llvm_work_item = WorkItem :: CopyPostLtoArtifacts ( module) ;
22842284 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost : 0 } ) ) ;
22852285}
22862286
2287- pub ( crate ) fn submit_pre_lto_module_to_llvm < B : ExtraBackendMethods > (
2287+ pub ( crate ) fn submit_pre_lto_module_to_llvm < B : WriteBackendMethods > (
22882288 tcx : TyCtxt < ' _ > ,
22892289 coordinator : & Coordinator < B > ,
22902290 module : CachedModuleCodegen ,
0 commit comments