@@ -23,7 +23,7 @@ use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
2323use rustc_incremental:: {
2424 copy_cgu_workproducts_to_incr_comp_cache_dir, in_incr_comp_dir, in_incr_comp_dir_sess,
2525} ;
26- use rustc_middle:: dep_graph:: { WorkProduct , WorkProductFileKind , WorkProductId } ;
26+ use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
2727use rustc_middle:: middle:: cstore:: EncodedMetadata ;
2828use rustc_middle:: middle:: exported_symbols:: SymbolExportLevel ;
2929use rustc_middle:: ty:: TyCtxt ;
@@ -478,10 +478,7 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
478478 let mut files = vec ! [ ] ;
479479
480480 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 ( ) ) ;
485482 }
486483
487484 if let Some ( ( id, product) ) =
@@ -818,20 +815,9 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
818815) -> Result < WorkItemResult < B > , FatalError > {
819816 let incr_comp_session_dir = cgcx. incr_comp_session_dir . as_ref ( ) . unwrap ( ) ;
820817 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 ( ) ) ;
835821 let source_file = in_incr_comp_dir ( & incr_comp_session_dir, & saved_file) ;
836822 debug ! (
837823 "copying pre-existing module `{}` from {:?} to {}" ,
@@ -851,13 +837,12 @@ fn execute_copy_from_cache_work_item<B: ExtraBackendMethods>(
851837 }
852838
853839 assert_eq ! ( object. is_some( ) , module_config. emit_obj != EmitObj :: None ) ;
854- assert_eq ! ( bytecode. is_some( ) , module_config. emit_bc) ;
855840
856841 Ok ( WorkItemResult :: Compiled ( CompiledModule {
857842 name : module. name ,
858843 kind : ModuleKind :: Regular ,
859844 object,
860- bytecode,
845+ bytecode : None ,
861846 } ) )
862847}
863848
0 commit comments