@@ -360,7 +360,7 @@ pub struct CodegenContext {
360360 pub parallel : bool ,
361361}
362362
363- fn generate_thin_lto_work < B : ExtraBackendMethods > (
363+ fn generate_thin_lto_work < B : WriteBackendMethods > (
364364 cgcx : & CodegenContext ,
365365 prof : & SelfProfilerRef ,
366366 dcx : DiagCtxtHandle < ' _ > ,
@@ -840,7 +840,7 @@ pub(crate) fn compute_per_cgu_lto_type(
840840 }
841841}
842842
843- fn execute_optimize_work_item < B : ExtraBackendMethods > (
843+ fn execute_optimize_work_item < B : WriteBackendMethods > (
844844 cgcx : & CodegenContext ,
845845 prof : & SelfProfilerRef ,
846846 shared_emitter : SharedEmitter ,
@@ -985,7 +985,7 @@ fn execute_copy_from_cache_work_item(
985985 }
986986}
987987
988- fn do_fat_lto < B : ExtraBackendMethods > (
988+ fn do_fat_lto < B : WriteBackendMethods > (
989989 cgcx : & CodegenContext ,
990990 prof : & SelfProfilerRef ,
991991 shared_emitter : SharedEmitter ,
@@ -1017,7 +1017,7 @@ fn do_fat_lto<B: ExtraBackendMethods>(
10171017 )
10181018}
10191019
1020- fn do_thin_lto < B : ExtraBackendMethods > (
1020+ fn do_thin_lto < B : WriteBackendMethods > (
10211021 cgcx : & CodegenContext ,
10221022 prof : & SelfProfilerRef ,
10231023 shared_emitter : SharedEmitter ,
@@ -1170,7 +1170,7 @@ fn do_thin_lto<B: ExtraBackendMethods>(
11701170 compiled_modules
11711171}
11721172
1173- fn execute_thin_lto_work_item < B : ExtraBackendMethods > (
1173+ fn execute_thin_lto_work_item < B : WriteBackendMethods > (
11741174 cgcx : & CodegenContext ,
11751175 prof : & SelfProfilerRef ,
11761176 shared_emitter : SharedEmitter ,
@@ -1897,7 +1897,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
18971897#[ must_use]
18981898pub ( crate ) struct WorkerFatalError ;
18991899
1900- fn spawn_work < ' a , B : ExtraBackendMethods > (
1900+ fn spawn_work < ' a , B : WriteBackendMethods > (
19011901 cgcx : & CodegenContext ,
19021902 prof : & ' a SelfProfilerRef ,
19031903 shared_emitter : SharedEmitter ,
@@ -1940,7 +1940,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
19401940 std:: thread:: Builder :: new ( ) . name ( name) . spawn ( f) . expect ( "failed to spawn work thread" ) ;
19411941}
19421942
1943- fn spawn_thin_lto_work < B : ExtraBackendMethods > (
1943+ fn spawn_thin_lto_work < B : WriteBackendMethods > (
19441944 cgcx : & CodegenContext ,
19451945 prof : & SelfProfilerRef ,
19461946 shared_emitter : SharedEmitter ,
@@ -2131,20 +2131,20 @@ impl SharedEmitterMain {
21312131 }
21322132}
21332133
2134- pub struct Coordinator < B : ExtraBackendMethods > {
2134+ pub struct Coordinator < B : WriteBackendMethods > {
21352135 sender : Sender < Message < B > > ,
21362136 future : Option < thread:: JoinHandle < Result < MaybeLtoModules < B > , ( ) > > > ,
21372137 // Only used for the Message type.
21382138 phantom : PhantomData < B > ,
21392139}
21402140
2141- impl < B : ExtraBackendMethods > Coordinator < B > {
2141+ impl < B : WriteBackendMethods > Coordinator < B > {
21422142 fn join ( mut self ) -> std:: thread:: Result < Result < MaybeLtoModules < B > , ( ) > > {
21432143 self . future . take ( ) . unwrap ( ) . join ( )
21442144 }
21452145}
21462146
2147- impl < B : ExtraBackendMethods > Drop for Coordinator < B > {
2147+ impl < B : WriteBackendMethods > Drop for Coordinator < B > {
21482148 fn drop ( & mut self ) {
21492149 if let Some ( future) = self . future . take ( ) {
21502150 // If we haven't joined yet, signal to the coordinator that it should spawn no more
@@ -2155,7 +2155,7 @@ impl<B: ExtraBackendMethods> Drop for Coordinator<B> {
21552155 }
21562156}
21572157
2158- pub struct OngoingCodegen < B : ExtraBackendMethods > {
2158+ pub struct OngoingCodegen < B : WriteBackendMethods > {
21592159 pub backend : B ,
21602160 pub crate_info : CrateInfo ,
21612161 pub output_filenames : Arc < OutputFilenames > ,
@@ -2167,7 +2167,7 @@ pub struct OngoingCodegen<B: ExtraBackendMethods> {
21672167 pub shared_emitter_main : SharedEmitterMain ,
21682168}
21692169
2170- impl < B : ExtraBackendMethods > OngoingCodegen < B > {
2170+ impl < B : WriteBackendMethods > OngoingCodegen < B > {
21712171 pub fn join ( self , sess : & Session ) -> ( CodegenResults , FxIndexMap < WorkProductId , WorkProduct > ) {
21722172 self . shared_emitter_main . check ( sess, true ) ;
21732173
@@ -2298,7 +2298,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
22982298 }
22992299}
23002300
2301- pub ( crate ) fn submit_codegened_module_to_llvm < B : ExtraBackendMethods > (
2301+ pub ( crate ) fn submit_codegened_module_to_llvm < B : WriteBackendMethods > (
23022302 coordinator : & Coordinator < B > ,
23032303 module : ModuleCodegen < B :: Module > ,
23042304 cost : u64 ,
@@ -2307,15 +2307,15 @@ pub(crate) fn submit_codegened_module_to_llvm<B: ExtraBackendMethods>(
23072307 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost } ) ) ;
23082308}
23092309
2310- pub ( crate ) fn submit_post_lto_module_to_llvm < B : ExtraBackendMethods > (
2310+ pub ( crate ) fn submit_post_lto_module_to_llvm < B : WriteBackendMethods > (
23112311 coordinator : & Coordinator < B > ,
23122312 module : CachedModuleCodegen ,
23132313) {
23142314 let llvm_work_item = WorkItem :: CopyPostLtoArtifacts ( module) ;
23152315 drop ( coordinator. sender . send ( Message :: CodegenDone :: < B > { llvm_work_item, cost : 0 } ) ) ;
23162316}
23172317
2318- pub ( crate ) fn submit_pre_lto_module_to_llvm < B : ExtraBackendMethods > (
2318+ pub ( crate ) fn submit_pre_lto_module_to_llvm < B : WriteBackendMethods > (
23192319 tcx : TyCtxt < ' _ > ,
23202320 coordinator : & Coordinator < B > ,
23212321 module : CachedModuleCodegen ,
0 commit comments