summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorMaxim Kalaev <maximk@il.ibm.com>2012-06-27 21:28:32 (GMT)
committerMaxim Kalaev <maximk@il.ibm.com>2012-06-28 07:14:26 (GMT)
commit6802d5aafbe1c3c524a2c25ef5839bb74865a1b5 (patch)
tree6e2a71f806d58b861b16198a9fa1d2347dfb1397 /src/graph.h
parentb3d63db1facc7ee9d14e211cc738f34b702de833 (diff)
downloadNinja-6802d5aafbe1c3c524a2c25ef5839bb74865a1b5.zip
Ninja-6802d5aafbe1c3c524a2c25ef5839bb74865a1b5.tar.gz
Ninja-6802d5aafbe1c3c524a2c25ef5839bb74865a1b5.tar.bz2
Improving Edge::Dump, introducing Node::Dump
- Edge::Dump could crash if called while inputs_ is being extended - Node::Dump prints Node attributes, in-edge and lists of out-edges - Dump functions now accept "prefix" parameter, printed along with the object for easier orientation. For example, edge->Dump("Re-reading deps files").
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h
index 32a859d..0ef4f3f 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -77,6 +77,8 @@ struct Node {
const vector<Edge*>& out_edges() const { return out_edges_; }
void AddOutEdge(Edge* edge) { out_edges_.push_back(edge); }
+ void Dump(const char* prefix="") const;
+
private:
string path_;
/// Possible values of mtime_:
@@ -173,7 +175,7 @@ struct Edge {
bool LoadDepFile(State* state, DiskInterface* disk_interface, string* err);
- void Dump();
+ void Dump(const char* prefix="") const;
const Rule* rule_;
vector<Node*> inputs_;