summaryrefslogtreecommitdiff
path: root/src/graph.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-13 13:05:51 -0500
committerBrad King <brad.king@kitware.com>2017-06-19 11:08:26 -0400
commitafe3beb980a4780caecc12d3fc919feb3f9cce42 (patch)
tree4c5be698e3e8ec0dacb7fb4c2738fe79ffcae3cd /src/graph.h
parent29a6e2fc6c671b9490193d4b235b53fb61886c80 (diff)
downloadninja-afe3beb980a4780caecc12d3fc919feb3f9cce42.tar.gz
Refactor RecomputeDirty to take a node instead of an edge
All call sites have a node on which they call `in_edge()` to call RecomputeDirty. Simplify call sites by taking the node directly and calling `in_edge()` internally.
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h
index ec24293..9e82ca2 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -246,11 +246,12 @@ struct DependencyScan {
disk_interface_(disk_interface),
dep_loader_(state, deps_log, disk_interface) {}
+ /// Update the |dirty_| state of the given node by inspecting its input edge.
/// Examine inputs, outputs, and command lines to judge whether an edge
/// needs to be re-run, and update outputs_ready_ and each outputs' |dirty_|
/// state accordingly.
/// Returns false on failure.
- bool RecomputeDirty(Edge* edge, string* err);
+ bool RecomputeDirty(Node* node, string* err);
/// Recompute whether any output of the edge is dirty, if so sets |*dirty|.
/// Returns false on failure.