@@ -1610,7 +1610,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
16101610
16111611 let symbol_map = Rc :: new ( symbol_map) ;
16121612
1613- let previous_work_products = trans_reuse_previous_work_products ( tcx ,
1613+ let previous_work_products = trans_reuse_previous_work_products ( & shared_ccx ,
16141614 & codegen_units,
16151615 & symbol_map) ;
16161616
@@ -1630,7 +1630,9 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
16301630
16311631 ModuleTranslation {
16321632 name : String :: from ( ccx. codegen_unit ( ) . name ( ) ) ,
1633- symbol_name_hash : ccx. codegen_unit ( ) . compute_symbol_name_hash ( tcx, & symbol_map) ,
1633+ symbol_name_hash : ccx. codegen_unit ( )
1634+ . compute_symbol_name_hash ( & shared_ccx,
1635+ & symbol_map) ,
16341636 source : source,
16351637 }
16361638 } )
@@ -1962,7 +1964,7 @@ fn gather_type_sizes<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
19621964
19631965/// For each CGU, identify if we can reuse an existing object file (or
19641966/// maybe other context).
1965- fn trans_reuse_previous_work_products ( tcx : TyCtxt ,
1967+ fn trans_reuse_previous_work_products ( scx : & SharedCrateContext ,
19661968 codegen_units : & [ CodegenUnit ] ,
19671969 symbol_map : & SymbolMap )
19681970 -> Vec < Option < WorkProduct > > {
@@ -1972,16 +1974,16 @@ fn trans_reuse_previous_work_products(tcx: TyCtxt,
19721974 . map ( |cgu| {
19731975 let id = cgu. work_product_id ( ) ;
19741976
1975- let hash = cgu. compute_symbol_name_hash ( tcx , symbol_map) ;
1977+ let hash = cgu. compute_symbol_name_hash ( scx , symbol_map) ;
19761978
19771979 debug ! ( "trans_reuse_previous_work_products: id={:?} hash={}" , id, hash) ;
19781980
1979- if let Some ( work_product) = tcx . dep_graph . previous_work_product ( & id) {
1981+ if let Some ( work_product) = scx . dep_graph ( ) . previous_work_product ( & id) {
19801982 if work_product. input_hash == hash {
19811983 debug ! ( "trans_reuse_previous_work_products: reusing {:?}" , work_product) ;
19821984 return Some ( work_product) ;
19831985 } else {
1984- if tcx . sess . opts . debugging_opts . incremental_info {
1986+ if scx . sess ( ) . opts . debugging_opts . incremental_info {
19851987 println ! ( "incremental: CGU `{}` invalidated because of \
19861988 changed partitioning hash.",
19871989 cgu. name( ) ) ;
0 commit comments