summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build.cc6
-rw-r--r--src/graph.cc3
-rw-r--r--src/graph.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/build.cc b/src/build.cc
index 8e567d9..3e3482c 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -312,7 +312,7 @@ bool Builder::Build(string* err) {
if (!StartEdge(edge, err))
return false;
- if (edge->rule_ == &State::kPhonyRule)
+ if (edge->is_phony())
FinishEdge(edge);
}
@@ -338,7 +338,7 @@ bool Builder::Build(string* err) {
}
bool Builder::StartEdge(Edge* edge, string* err) {
- if (edge->rule_ == &State::kPhonyRule)
+ if (edge->is_phony())
return true;
status_->BuildEdgeStarted(edge);
@@ -370,7 +370,7 @@ void Builder::FinishEdge(Edge* edge) {
}
plan_.EdgeFinished(edge);
- if (edge->rule_ == &State::kPhonyRule)
+ if (edge->is_phony())
return;
int ms = status_->BuildEdgeFinished(edge);
diff --git a/src/graph.cc b/src/graph.cc
index f73028e..39e7841 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -170,3 +170,6 @@ void Edge::Dump() {
printf("]\n");
}
+bool Edge::is_phony() const {
+ return rule_ == &State::kPhonyRule;
+}
diff --git a/src/graph.h b/src/graph.h
index 2ebf2e4..4f936b7 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -101,6 +101,8 @@ struct Edge {
bool is_order_only(int index) {
return index >= ((int)inputs_.size()) - order_only_deps_;
}
+
+ bool is_phony() const;
};
#endif // NINJA_GRAPH_H_