summaryrefslogtreecommitdiffstats
path: root/src/build_log.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-09-12 18:44:12 (GMT)
committerEvan Martin <martine@danga.com>2011-09-12 18:46:18 (GMT)
commit3fbb25b2cc66f236a39b728d20e5d44da23612ac (patch)
treed6eb7c1bc63ef3d4d4d1056750756dc581da5ef0 /src/build_log.h
parentf1139aff5deddacd899be064fad9ed5a185e7444 (diff)
downloadNinja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.zip
Ninja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.tar.gz
Ninja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.tar.bz2
generalize the pattern of hash_map<const char*, ...>, use in BuildLog
Refactor the code in StatCache for use in BuildLog. Now both use hash tables where the keys are const char*. Removes another 30ms from Chrome no-op builds.
Diffstat (limited to 'src/build_log.h')
-rw-r--r--src/build_log.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_log.h b/src/build_log.h
index f45cbde..4a11c1a 100644
--- a/src/build_log.h
+++ b/src/build_log.h
@@ -19,6 +19,8 @@
#include <string>
using namespace std;
+#include "hash_map.h"
+
struct BuildConfig;
struct Edge;
@@ -64,7 +66,7 @@ struct BuildLog {
/// Rewrite the known log entries, throwing away old data.
bool Recompact(const string& path, string* err);
- typedef map<string, LogEntry*> Log;
+ typedef ExternalStringHashMap<LogEntry*>::Type Log;
Log log_;
FILE* log_file_;
BuildConfig* config_;