diff options
Diffstat (limited to 'src/msvc_helper.h')
-rw-r--r-- | src/msvc_helper.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/msvc_helper.h b/src/msvc_helper.h index 30f87f3..70d1fff 100644 --- a/src/msvc_helper.h +++ b/src/msvc_helper.h @@ -13,42 +13,10 @@ // limitations under the License. #include <string> -#include <set> -#include <vector> using namespace std; string EscapeForDepfile(const string& path); -/// Visual Studio's cl.exe requires some massaging to work with Ninja; -/// for example, it emits include information on stderr in a funny -/// format when building with /showIncludes. This class parses this -/// output. -struct CLParser { - /// Parse a line of cl.exe output and extract /showIncludes info. - /// If a dependency is extracted, returns a nonempty string. - /// Exposed for testing. - static string FilterShowIncludes(const string& line, - const string& deps_prefix); - - /// Return true if a mentioned include file is a system path. - /// Filtering these out reduces dependency information considerably. - static bool IsSystemInclude(string path); - - /// Parse a line of cl.exe output and return true if it looks like - /// it's printing an input filename. This is a heuristic but it appears - /// to be the best we can do. - /// Exposed for testing. - static bool FilterInputFilename(string line); - - /// Parse the full output of cl, filling filtered_output with the text that - /// should be printed (if any). Returns true on success, or false with err - /// filled. output must not be the same object as filtered_object. - bool Parse(const string& output, const string& deps_prefix, - string* filtered_output, string* err); - - set<string> includes_; -}; - /// Wraps a synchronous execution of a CL subprocess. struct CLWrapper { CLWrapper() : env_block_(NULL) {} |