diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-04-27 19:17:10 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-04-27 19:17:10 (GMT) |
commit | a60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d (patch) | |
tree | 096eff77f63235157d529d749cc6d67199856f1d /src/manifest_parser_perftest.cc | |
parent | 484c16336f19bd8970bb6e75322d61b92a229899 (diff) | |
parent | 06b0e568f62d228837e96c485447f55da1ae9b5d (diff) | |
download | Ninja-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/manifest_parser_perftest.cc')
-rw-r--r-- | src/manifest_parser_perftest.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/manifest_parser_perftest.cc b/src/manifest_parser_perftest.cc index 6b56ab0..60c2054 100644 --- a/src/manifest_parser_perftest.cc +++ b/src/manifest_parser_perftest.cc @@ -19,6 +19,7 @@ #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #ifdef _WIN32 @@ -36,12 +37,6 @@ #include "state.h" #include "util.h" -struct RealFileReader : public ManifestParser::FileReader { - virtual bool ReadFile(const string& path, string* content, string* err) { - return ::ReadFile(path, content, err) == 0; - } -}; - bool WriteFakeManifests(const string& dir, string* err) { RealDiskInterface disk_interface; TimeStamp mtime = disk_interface.Stat(dir + "/build.ninja", err); @@ -59,9 +54,9 @@ bool WriteFakeManifests(const string& dir, string* err) { int LoadManifests(bool measure_command_evaluation) { string err; - RealFileReader file_reader; + RealDiskInterface disk_interface; State state; - ManifestParser parser(&state, &file_reader); + ManifestParser parser(&state, &disk_interface, kDupeEdgeActionWarn); if (!parser.Load("build.ninja", &err)) { fprintf(stderr, "Failed to read test data: %s\n", err.c_str()); exit(1); |