diff options
author | Evan Martin <martine@danga.com> | 2012-09-02 18:03:01 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-09-02 18:05:51 (GMT) |
commit | fd91e0dc26d18209f7625730bb0e653f8321fff9 (patch) | |
tree | 3220f1082693486d0b2ba196afe3e791aecff3c7 /src/build.h | |
parent | df6d995790ee15317fd9ddb47c9d59f30265afe5 (diff) | |
download | Ninja-fd91e0dc26d18209f7625730bb0e653f8321fff9.zip Ninja-fd91e0dc26d18209f7625730bb0e653f8321fff9.tar.gz Ninja-fd91e0dc26d18209f7625730bb0e653f8321fff9.tar.bz2 |
split out dirty recomputation logic from Edge class
Rather than passing States and DiskInterfaces through all the calls,
put the necessary ambient information in a new DependencyScan object
and move the code accordingly.
Note: I didn't move the source location of the functions to preserve
history, though this does result in a sort of weird order for the
functions in graph.cc.
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build.h b/src/build.h index 986e8a9..9152eac 100644 --- a/src/build.h +++ b/src/build.h @@ -23,6 +23,7 @@ #include <memory> #include <cstdio> +#include "graph.h" // XXX needed for DependencyScan; should rearrange. #include "exit_status.h" #include "metrics.h" #include "util.h" // int64_t @@ -59,7 +60,7 @@ struct Plan { void EdgeFinished(Edge* edge); /// Clean the given node during the build. - void CleanNode(BuildLog* build_log, Node* node); + void CleanNode(DependencyScan* scan, Node* node); /// Number of edges with commands to run. int command_edge_count() const { return command_edges_; } @@ -151,6 +152,7 @@ struct Builder { private: DiskInterface* disk_interface_; + DependencyScan scan_; // Unimplemented copy ctor and operator= ensure we don't copy the auto_ptr. Builder(const Builder &other); // DO NOT IMPLEMENT |