incr.comp.: Remove unused DepKind::WorkProduct.

This commit is contained in:
Michael Woerister
2017-11-08 11:44:55 +01:00
parent 702ce8f0a6
commit d948af1d37
3 changed files with 3 additions and 27 deletions
-11
View File
@@ -459,10 +459,6 @@ pub fn fingerprint_needed_for_crate_hash(self) -> bool {
// Represents metadata from an extern crate.
[input] CrateMetadata(CrateNum),
// Represents some artifact that we save to disk. Note that these
// do not have a def-id as part of their identifier.
[] WorkProduct(WorkProductId),
// Represents different phases in the compiler.
[] RegionScopeTree(DefId),
[eval_always] Coherence,
@@ -781,13 +777,6 @@ pub fn from_fingerprint(fingerprint: Fingerprint) -> WorkProductId {
hash: fingerprint
}
}
pub fn to_dep_node(self) -> DepNode {
DepNode {
kind: DepKind::WorkProduct,
hash: self.hash,
}
}
}
impl_stable_hash_for!(struct ::dep_graph::WorkProductId {
+2 -3
View File
@@ -721,9 +721,8 @@ macro_rules! force {
DepKind::EraseRegionsTy |
DepKind::NormalizeTy |
// These are just odd
DepKind::Null |
DepKind::WorkProduct => {
// This one should never occur in this context
DepKind::Null => {
bug!("force_from_dep_node() - Encountered {:?}", dep_node.kind)
}
+1 -13
View File
@@ -104,7 +104,7 @@
use collector::InliningMap;
use common;
use rustc::dep_graph::{DepNode, WorkProductId};
use rustc::dep_graph::WorkProductId;
use rustc::hir::def_id::DefId;
use rustc::hir::map::DefPathData;
use rustc::middle::trans::{Linkage, Visibility};
@@ -147,10 +147,6 @@ fn work_product_id(&self) -> WorkProductId {
WorkProductId::from_cgu_name(self.name())
}
fn work_product_dep_node(&self) -> DepNode {
self.work_product_id().to_dep_node()
}
fn items_in_deterministic_order<'a>(&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>)
-> Vec<(TransItem<'tcx>,
@@ -253,14 +249,6 @@ pub fn partition<'a, 'tcx, I>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
cgu1.name().cmp(cgu2.name())
});
if tcx.sess.opts.enable_dep_node_debug_strs() {
for cgu in &result {
let dep_node = cgu.work_product_dep_node();
tcx.dep_graph.register_dep_node_debug_str(dep_node,
|| cgu.name().to_string());
}
}
result
}