diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-01-04 05:12:31 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-01-04 05:12:31 (GMT) |
commit | c8b5ad32899503a1f992f7db75fd2c56e8d49238 (patch) | |
tree | 5cc32b2d2074116850860fb1021bb05dc75e2e31 /src/deps_log.h | |
parent | 637b4572ba9c98b812858a37521af1d442b3ccc4 (diff) | |
download | Ninja-c8b5ad32899503a1f992f7db75fd2c56e8d49238.zip Ninja-c8b5ad32899503a1f992f7db75fd2c56e8d49238.tar.gz Ninja-c8b5ad32899503a1f992f7db75fd2c56e8d49238.tar.bz2 |
Move duplicated code into a helper function.
Diffstat (limited to 'src/deps_log.h')
-rw-r--r-- | src/deps_log.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/deps_log.h b/src/deps_log.h index babf828..cec0257 100644 --- a/src/deps_log.h +++ b/src/deps_log.h @@ -88,6 +88,14 @@ struct DepsLog { /// Rewrite the known log entries, throwing away old data. bool Recompact(const string& path, string* err); + /// Returns if the deps entry for a node is still reachable from the manifest. + /// + /// The deps log can contain deps entries for files that were built in the + /// past but are no longer part of the manifest. This function returns if + /// this is the case for a given node. This function is slow, don't call + /// it from code that runs on every build. + bool IsDepsEntryLiveFor(Node* node); + /// Used for tests. const vector<Node*>& nodes() const { return nodes_; } const vector<Deps*>& deps() const { return deps_; } |