@@ -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 < ' _ > ,
@@ -833,7 +833,7 @@ pub(crate) fn compute_per_cgu_lto_type(
833833 }
834834}
835835
836- fn execute_optimize_work_item < B : ExtraBackendMethods > (
836+ fn execute_optimize_work_item < B : WriteBackendMethods > (
837837 cgcx : & CodegenContext ,
838838 prof : & SelfProfilerRef ,
839839 shared_emitter : SharedEmitter ,
@@ -978,7 +978,7 @@ fn execute_copy_from_cache_work_item(
978978 }
979979}
980980
981- fn do_fat_lto < B : ExtraBackendMethods > (
981+ fn do_fat_lto < B : WriteBackendMethods > (
982982 cgcx : & CodegenContext ,
983983 prof : & SelfProfilerRef ,
984984 shared_emitter : SharedEmitter ,
@@ -1010,7 +1010,7 @@ fn do_fat_lto<B: ExtraBackendMethods>(
10101010 )
10111011}
10121012
1013- fn do_thin_lto < B : ExtraBackendMethods > (
1013+ fn do_thin_lto < B : WriteBackendMethods > (
10141014 cgcx : & CodegenContext ,
10151015 prof : & SelfProfilerRef ,
10161016 shared_emitter : SharedEmitter ,
@@ -1163,7 +1163,7 @@ fn do_thin_lto<B: ExtraBackendMethods>(
11631163 compiled_modules
11641164}
11651165
1166- fn execute_thin_lto_work_item < B : ExtraBackendMethods > (
1166+ fn execute_thin_lto_work_item < B : WriteBackendMethods > (
11671167 cgcx : & CodegenContext ,
11681168 prof : & SelfProfilerRef ,
11691169 shared_emitter : SharedEmitter ,
@@ -1890,7 +1890,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
18901890#[ must_use]
18911891pub ( crate ) struct WorkerFatalError ;
18921892
1893- fn spawn_work < ' a , B : ExtraBackendMethods > (
1893+ fn spawn_work < ' a , B : WriteBackendMethods > (
18941894 cgcx : & CodegenContext ,
18951895 prof : & ' a SelfProfilerRef ,
18961896 shared_emitter : SharedEmitter ,
@@ -1933,7 +1933,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
19331933 std:: thread:: Builder :: new ( ) . name ( name) . spawn ( f) . expect ( "failed to spawn work thread" ) ;
19341934}
19351935
1936- fn spawn_thin_lto_work < B : ExtraBackendMethods > (
1936+ fn spawn_thin_lto_work < B : WriteBackendMethods > (
19371937 cgcx : & CodegenContext ,
19381938 prof : & SelfProfilerRef ,
19391939 shared_emitter : SharedEmitter ,
@@ -2120,20 +2120,20 @@ impl SharedEmitterMain {
21202120 }
21212121}
21222122
2123- pub struct Coordinator < B : ExtraBackendMethods > {
2123+ pub struct Coordinator < B : WriteBackendMethods > {
21242124 sender : Sender < Message < B > > ,
21252125 future : Option < thread:: JoinHandle < Result < MaybeLtoModules < B > , ( ) > > > ,
21262126 // Only used for the Message type.
21272127 phantom : PhantomData < B > ,
21282128}
21292129
2130- impl < B : ExtraBackendMethods > Coordinator < B > {
2130+ impl < B : WriteBackendMethods > Coordinator < B > {
21312131 fn join ( mut self ) -> std:: thread:: Result < Result < MaybeLtoModules < B > , ( ) > > {
21322132 self . future . take ( ) . unwrap ( ) . join ( )
21332133 }
21342134}
21352135
2136- impl < B : ExtraBackendMethods > Drop for Coordinator < B > {
2136+ impl < B : WriteBackendMethods > Drop for Coordinator < B > {
21372137 fn drop ( & mut self ) {
21382138 if let Some ( future) = self . future . take ( ) {
21392139 // If we haven't joined yet, signal to the coordinator that it should spawn no more
@@ -2144,7 +2144,7 @@ impl<B: ExtraBackendMethods> Drop for Coordinator<B> {
21442144 }
21452145}
21462146
2147- pub struct OngoingCodegen < B : ExtraBackendMethods > {
2147+ pub struct OngoingCodegen < B : WriteBackendMethods > {
21482148 pub backend : B ,
21492149 pub crate_info : CrateInfo ,
21502150 pub output_filenames : Arc < OutputFilenames > ,
@@ -2156,7 +2156,7 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
21562156 pub shared_emitter_main : SharedEmitterMain ,
21572157}
21582158
2159- impl < B : ExtraBackendMethods > OngoingCodegen < B > {
2159+ impl < B : WriteBackendMethods > OngoingCodegen < B > {
21602160 pub fn join ( self , sess : & Session ) -> ( CodegenResults , FxIndexMap < WorkProductId , WorkProduct > ) {
21612161 self . shared_emitter_main . check ( sess, true ) ;
21622162
@@ -2287,7 +2287,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
22872287 }
22882288}
22892289
2290- pub ( crate ) fn submit_codegened_module_to_llvm < B : ExtraBackendMethods > (
2290+ pub ( crate ) fn submit_codegened_module_to_llvm < B : WriteBackendMethods > (
22912291 coordinator : & Coordinator < B > ,
22922292 module : ModuleCodegen < B :: Module > ,
22932293 cost : u64 ,
@@ -2296,15 +2296,15 @@ pub(crate) fn submit_codegened_module_to_llvm<B: ExtraBackendMethods>(
22962296 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost } ) ) ;
22972297}
22982298
2299- pub ( crate ) fn submit_post_lto_module_to_llvm < B : ExtraBackendMethods > (
2299+ pub ( crate ) fn submit_post_lto_module_to_llvm < B : WriteBackendMethods > (
23002300 coordinator : & Coordinator < B > ,
23012301 module : CachedModuleCodegen ,
23022302) {
23032303 let llvm_work_item = WorkItem :: CopyPostLtoArtifacts ( module) ;
23042304 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost : 0 } ) ) ;
23052305}
23062306
2307- pub ( crate ) fn submit_pre_lto_module_to_llvm < B : ExtraBackendMethods > (
2307+ pub ( crate ) fn submit_pre_lto_module_to_llvm < B : WriteBackendMethods > (
23082308 tcx : TyCtxt < ' _ > ,
23092309 coordinator : & Coordinator < B > ,
23102310 module : CachedModuleCodegen ,
0 commit comments