summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h
index 66e31b5..9aada38 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -33,8 +33,9 @@ struct State;
/// Information about a node in the dependency graph: the file, whether
/// it's dirty, mtime, etc.
struct Node {
- explicit Node(const string& path)
+ Node(const string& path, unsigned int slash_bits)
: path_(path),
+ slash_bits_(slash_bits),
mtime_(-1),
dirty_(false),
in_edge_(NULL),
@@ -71,6 +72,9 @@ struct Node {
}
const string& path() const { return path_; }
+ /// Get |path()| but use slash_bits to convert back to original slash styles.
+ string PathDecanonicalized() const;
+ unsigned int slash_bits() const { return slash_bits_; }
TimeStamp mtime() const { return mtime_; }
bool dirty() const { return dirty_; }
@@ -90,6 +94,11 @@ struct Node {
private:
string path_;
+
+ /// Set bits starting from lowest for backslashes that were normalized to
+ /// forward slashes by CanonicalizePath. See |PathDecanonicalized|.
+ unsigned int slash_bits_;
+
/// Possible values of mtime_:
/// -1: file hasn't been examined
/// 0: we looked, and file doesn't exist