about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_trans/base.rs2
-rw-r--r--src/librustc_trans/partitioning.rs21
2 files changed, 5 insertions, 18 deletions
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs
index 14c73de64bc..49a2885747f 100644
--- a/src/librustc_trans/base.rs
+++ b/src/librustc_trans/base.rs
@@ -1172,7 +1172,7 @@ pub fn trans_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
 
         let cgu_name = String::from(cgu.name());
         let cgu_id = cgu.work_product_id();
-        let symbol_name_hash = cgu.compute_symbol_name_hash(scx, &exported_symbols);
+        let symbol_name_hash = cgu.compute_symbol_name_hash(scx);
 
         // Check whether there is a previous work-product we can
         // re-use.  Not only must the file exist, and the inputs not
diff --git a/src/librustc_trans/partitioning.rs b/src/librustc_trans/partitioning.rs
index 904cfb2acd7..cff0eca02c6 100644
--- a/src/librustc_trans/partitioning.rs
+++ b/src/librustc_trans/partitioning.rs
@@ -174,29 +174,16 @@ impl<'tcx> CodegenUnit<'tcx> {
     }
 
     pub fn compute_symbol_name_hash<'a>(&self,
-                                        scx: &SharedCrateContext<'a, 'tcx>,
-                                        exported_symbols: &ExportedSymbols)
+                                        scx: &SharedCrateContext<'a, 'tcx>)
                                         -> u64 {
         let mut state = IchHasher::new();
-        let exported_symbols = exported_symbols.local_exports();
         let all_items = self.items_in_deterministic_order(scx.tcx());
-        for (item, _) in all_items {
+        for (item, (linkage, visibility)) in all_items {
             let symbol_name = item.symbol_name(scx.tcx());
             symbol_name.len().hash(&mut state);
             symbol_name.hash(&mut state);
-            let exported = match item {
-                TransItem::Fn(ref instance) => {
-                    let node_id =
-                        scx.tcx().hir.as_local_node_id(instance.def_id());
-                    node_id.map(|node_id| exported_symbols.contains(&node_id))
-                        .unwrap_or(false)
-                }
-                TransItem::Static(node_id) => {
-                    exported_symbols.contains(&node_id)
-                }
-                TransItem::GlobalAsm(..) => true,
-            };
-            exported.hash(&mut state);
+            linkage.hash(&mut state);
+            visibility.hash(&mut state);
         }
         state.finish().to_smaller_hash()
     }