diff options
author | Maxim Kalaev <maximus.ka@gmail.com> | 2013-09-02 22:32:19 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-09-02 22:32:19 (GMT) |
commit | 41c6258ec1928cbcfc5642504cb9c2b3659fa897 (patch) | |
tree | 5c13188a748ee68f36165e937d1e8675850af852 /src/graph.h | |
parent | d7a46654a7be1a46a777a8d8a51f065ac98ce05d (diff) | |
download | Ninja-41c6258ec1928cbcfc5642504cb9c2b3659fa897.zip Ninja-41c6258ec1928cbcfc5642504cb9c2b3659fa897.tar.gz Ninja-41c6258ec1928cbcfc5642504cb9c2b3659fa897.tar.bz2 |
Share more code between CleanNode() and RecomputeDirty().
Move a common loop into the new function RecomputeOutputsDirty().
Simplifies things a bit, and makes it harder for the restat path to have
different behavior from the regular path.
No dramatic behavior change (the restat path now also calls
RestatIfNecessary()).
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h index bd0cb34..d5d0f4f 100644 --- a/src/graph.h +++ b/src/graph.h @@ -240,10 +240,9 @@ struct DependencyScan { /// Returns false on failure. bool RecomputeDirty(Edge* edge, string* err); - /// Recompute whether a given single output should be marked dirty. + /// Recompute whether any output of the edge is dirty. /// Returns true if so. - bool RecomputeOutputDirty(Edge* edge, Node* most_recent_input, - const string& command, Node* output); + bool RecomputeOutputsDirty(Edge* edge, Node* most_recent_input); BuildLog* build_log() const { return build_log_; @@ -257,6 +256,11 @@ struct DependencyScan { } private: + /// Recompute whether a given single output should be marked dirty. + /// Returns true if so. + bool RecomputeOutputDirty(Edge* edge, Node* most_recent_input, + const string& command, Node* output); + BuildLog* build_log_; DiskInterface* disk_interface_; ImplicitDepLoader dep_loader_; |