summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 424f941..818eb4f 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -143,6 +143,15 @@ bool Edge::RecomputeOutputDirty(BuildLog* build_log, time_t most_recent_input,
return false;
}
+bool Edge::AllInputsReady() const {
+ for (vector<Node*>::const_iterator i = inputs_.begin();
+ i != inputs_.end(); ++i) {
+ if ((*i)->in_edge_ && !(*i)->in_edge_->outputs_ready())
+ return false;
+ }
+ return true;
+}
+
/// An Env for an Edge, providing $in and $out.
struct EdgeEnv : public Env {
EdgeEnv(Edge* edge) : edge_(edge) {}