@@ -23,7 +23,7 @@ use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
23
23
use rustc_incremental:: {
24
24
copy_cgu_workproducts_to_incr_comp_cache_dir, in_incr_comp_dir, in_incr_comp_dir_sess,
25
25
} ;
26
- use rustc_middle:: dep_graph:: { WorkProduct , WorkProductFileKind , WorkProductId } ;
26
+ use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
27
27
use rustc_middle:: middle:: cstore:: EncodedMetadata ;
28
28
use rustc_middle:: middle:: exported_symbols:: SymbolExportLevel ;
29
29
use rustc_middle:: ty:: TyCtxt ;
@@ -478,10 +478,7 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
478
478
let mut files = vec ! [ ] ;
479
479
480
480
if let Some ( ref path) = module. object {
481
- files. push ( ( WorkProductFileKind :: Object , path. clone ( ) ) ) ;
482
- }
483
- if let Some ( ref path) = module. bytecode {
484
- files. push ( ( WorkProductFileKind :: Bytecode , path. clone ( ) ) ) ;
481
+ files. push ( path. clone ( ) ) ;
485
482
}
486
483
487
484
if let Some ( ( id, product) ) =
@@ -818,20 +815,9 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
818
815
) -> Result < WorkItemResult < B > , FatalError > {
819
816
let incr_comp_session_dir = cgcx. incr_comp_session_dir . as_ref ( ) . unwrap ( ) ;
820
817
let mut object = None ;
821
- let mut bytecode = None ;
822
- for ( kind, saved_file) in & module. source . saved_files {
823
- let obj_out = match kind {
824
- WorkProductFileKind :: Object => {
825
- let path = cgcx. output_filenames . temp_path ( OutputType :: Object , Some ( & module. name ) ) ;
826
- object = Some ( path. clone ( ) ) ;
827
- path
828
- }
829
- WorkProductFileKind :: Bytecode => {
830
- let path = cgcx. output_filenames . temp_path ( OutputType :: Bitcode , Some ( & module. name ) ) ;
831
- bytecode = Some ( path. clone ( ) ) ;
832
- path
833
- }
834
- } ;
818
+ for saved_file in & module. source . saved_files {
819
+ let obj_out = cgcx. output_filenames . temp_path ( OutputType :: Object , Some ( & module. name ) ) ;
820
+ object = Some ( obj_out. clone ( ) ) ;
835
821
let source_file = in_incr_comp_dir ( & incr_comp_session_dir, & saved_file) ;
836
822
debug ! (
837
823
"copying pre-existing module `{}` from {:?} to {}" ,
@@ -851,13 +837,12 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
851
837
}
852
838
853
839
assert_eq ! ( object. is_some( ) , module_config. emit_obj != EmitObj :: None ) ;
854
- assert_eq ! ( bytecode. is_some( ) , module_config. emit_bc) ;
855
840
856
841
Ok ( WorkItemResult :: Compiled ( CompiledModule {
857
842
name : module. name ,
858
843
kind : ModuleKind :: Regular ,
859
844
object,
860
- bytecode,
845
+ bytecode : None ,
861
846
} ) )
862
847
}
863
848
0 commit comments