summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-04-27 19:17:10 (GMT)
committerNico Weber <nicolasweber@gmx.de>2016-04-27 19:17:10 (GMT)
commita60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d (patch)
tree096eff77f63235157d529d749cc6d67199856f1d /src/graph.h
parent484c16336f19bd8970bb6e75322d61b92a229899 (diff)
parent06b0e568f62d228837e96c485447f55da1ae9b5d (diff)
downloadNinja-1.7.0.zip
Ninja-1.7.0.tar.gz
Ninja-1.7.0.tar.bz2
v1.7.0v1.7.0
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/graph.h b/src/graph.h
index 5f8d41a..add8d3d 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -72,8 +72,13 @@ struct Node {
const string& path() const { return path_; }
/// Get |path()| but use slash_bits to convert back to original slash styles.
- string PathDecanonicalized() const;
+ string PathDecanonicalized() const {
+ return PathDecanonicalized(path_, slash_bits_);
+ }
+ static string PathDecanonicalized(const string& path,
+ unsigned int slash_bits);
unsigned int slash_bits() const { return slash_bits_; }
+
TimeStamp mtime() const { return mtime_; }
bool dirty() const { return dirty_; }
@@ -124,7 +129,7 @@ private:
struct Edge {
Edge() : rule_(NULL), pool_(NULL), env_(NULL),
outputs_ready_(false), deps_missing_(false),
- implicit_deps_(0), order_only_deps_(0) {}
+ implicit_deps_(0), order_only_deps_(0), implicit_outs_(0) {}
/// Return true if all inputs' in-edges are ready.
bool AllInputsReady() const;
@@ -176,6 +181,16 @@ struct Edge {
return index >= inputs_.size() - order_only_deps_;
}
+ // There are two types of outputs.
+ // 1) explicit outs, which show up as $out on the command line;
+ // 2) implicit outs, which the target generates but are not part of $out.
+ // These are stored in outputs_ in that order, and we keep a count of
+ // #2 to use when we need to access the various subsets.
+ int implicit_outs_;
+ bool is_implicit_out(size_t index) const {
+ return index >= outputs_.size() - implicit_outs_;
+ }
+
bool is_phony() const;
bool use_console() const;
};