diff options
author | Evan Martin <martine@danga.com> | 2012-09-02 19:53:59 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-09-02 19:56:08 (GMT) |
commit | 4d9bf949e0fd6976725dea12bcc254fd39da6490 (patch) | |
tree | 3b255fabddbdece75019d522d14c97532610466e /src/build_log.h | |
parent | 3220e626da48bc0fd69bee5a3dfae3b55bd0b761 (diff) | |
download | Ninja-4d9bf949e0fd6976725dea12bcc254fd39da6490.zip Ninja-4d9bf949e0fd6976725dea12bcc254fd39da6490.tar.gz Ninja-4d9bf949e0fd6976725dea12bcc254fd39da6490.tar.bz2 |
remove config from BuildLog, rename members
Diffstat (limited to 'src/build_log.h')
-rw-r--r-- | src/build_log.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/build_log.h b/src/build_log.h index d3994ff..4141ff3 100644 --- a/src/build_log.h +++ b/src/build_log.h @@ -22,24 +22,21 @@ using namespace std; #include "hash_map.h" #include "timestamp.h" -#include "util.h" +#include "util.h" // uint64_t -struct BuildConfig; struct Edge; /// Store a log of every command ran for every build. /// It has a few uses: /// -/// 1) historical command lines for output files, so we know +/// 1) (hashes of) command lines for existing output files, so we know /// when we need to rebuild due to the command changing -/// 2) historical timing information -/// 3) maybe we can generate some sort of build overview output -/// from it +/// 2) timing information, perhaps for generating reports +/// 3) restat information struct BuildLog { BuildLog(); ~BuildLog(); - void SetConfig(BuildConfig* config) { config_ = config; } bool OpenForWrite(const string& path, string* err); void RecordCommand(Edge* edge, int start_time, int end_time, TimeStamp restat_mtime = 0); @@ -74,13 +71,12 @@ struct BuildLog { /// Rewrite the known log entries, throwing away old data. bool Recompact(const string& path, string* err); - typedef ExternalStringHashMap<LogEntry*>::Type Log; - const Log& log() const { return log_; } + typedef ExternalStringHashMap<LogEntry*>::Type Entries; + const Entries& entries() const { return entries_; } private: - Log log_; + Entries entries_; FILE* log_file_; - BuildConfig* config_; bool needs_recompaction_; }; |