@@ -751,9 +751,19 @@ impl<B: WriteBackendMethods> WorkItem<B> {
751
751
752
752
/// A result produced by the backend.
753
753
pub ( crate ) enum WorkItemResult < B : WriteBackendMethods > {
754
- Compiled ( CompiledModule ) ,
754
+ /// The backend has finished compiling a CGU, nothing more required.
755
+ Finished ( CompiledModule ) ,
756
+
757
+ /// The backend has finished compiling a CGU, which now needs linking
758
+ /// because `-Zcombine-cgu` was specified.
755
759
NeedsLink ( ModuleCodegen < B :: Module > ) ,
760
+
761
+ /// The backend has finished compiling a CGU, which now needs to go through
762
+ /// fat LTO.
756
763
NeedsFatLTO ( FatLTOInput < B > ) ,
764
+
765
+ /// The backend has finished compiling a CGU, which now needs to go through
766
+ /// thin LTO.
757
767
NeedsThinLTO ( String , B :: ThinBuffer ) ,
758
768
}
759
769
@@ -906,7 +916,7 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
906
916
load_from_incr_comp_dir ( dwarf_obj_out, & saved_dwarf_object_file)
907
917
} ) ;
908
918
909
- WorkItemResult :: Compiled ( CompiledModule {
919
+ WorkItemResult :: Finished ( CompiledModule {
910
920
name : module. name ,
911
921
kind : ModuleKind :: Regular ,
912
922
object,
@@ -936,7 +946,7 @@ fn finish_intra_module_work<B: ExtraBackendMethods>(
936
946
|| module. kind == ModuleKind :: Allocator
937
947
{
938
948
let module = unsafe { B :: codegen ( cgcx, & diag_handler, module, module_config) ? } ;
939
- Ok ( WorkItemResult :: Compiled ( module) )
949
+ Ok ( WorkItemResult :: Finished ( module) )
940
950
} else {
941
951
Ok ( WorkItemResult :: NeedsLink ( module) )
942
952
}
@@ -1522,7 +1532,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1522
1532
free_worker ( worker_id) ;
1523
1533
1524
1534
match result {
1525
- Ok ( WorkItemResult :: Compiled ( compiled_module) ) => {
1535
+ Ok ( WorkItemResult :: Finished ( compiled_module) ) => {
1526
1536
match compiled_module. kind {
1527
1537
ModuleKind :: Regular => {
1528
1538
compiled_modules. push ( compiled_module) ;
0 commit comments