diff options
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); |