diff options
author | Evan Martin <martine@danga.com> | 2011-12-27 21:48:17 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-27 21:48:17 (GMT) |
commit | fe7e51531e5df3149538007c40b8d115ceebb805 (patch) | |
tree | b6e7e4f0499b3a3b3acdfaaa8d1cb624d1b73bf9 /src/depfile_parser.h | |
parent | 51709668ab2d7d701b415a1a85cfc66c83db4510 (diff) | |
download | Ninja-fe7e51531e5df3149538007c40b8d115ceebb805.zip Ninja-fe7e51531e5df3149538007c40b8d115ceebb805.tar.gz Ninja-fe7e51531e5df3149538007c40b8d115ceebb805.tar.bz2 |
switch DepfileParser to take a string* to make memory clearer
Add some comments as well.
Diffstat (limited to 'src/depfile_parser.h')
-rw-r--r-- | src/depfile_parser.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/depfile_parser.h b/src/depfile_parser.h index fd94be9..08bf68a 100644 --- a/src/depfile_parser.h +++ b/src/depfile_parser.h @@ -18,8 +18,11 @@ using namespace std; #include "string_piece.h" +/// Parser for the dependency information emitted by gcc's -M flags. struct DepfileParser { - bool Parse(const string& content, string* err); + /// Parse an input file. Warning: may mutate the content in-place + /// and parsed StringPieces are pointers within it. + bool Parse(string* content, string* err); StringPiece out_; vector<StringPiece> ins_; |