diff options
Diffstat (limited to 'libbuild2/cc/parser.hxx')
-rw-r--r-- | libbuild2/cc/parser.hxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libbuild2/cc/parser.hxx b/libbuild2/cc/parser.hxx index a1f1e57..0c2eb2d 100644 --- a/libbuild2/cc/parser.hxx +++ b/libbuild2/cc/parser.hxx @@ -10,6 +10,7 @@ #include <libbuild2/diagnostics.hxx> #include <libbuild2/cc/types.hxx> +#include <libbuild2/cc/guess.hxx> // compiler_id namespace build2 { @@ -23,16 +24,19 @@ namespace build2 class parser { public: + // The compiler_id argument should identify the compiler that has done + // the preprocessing. + // unit - parse (ifdstream& is, const path_name& n) + parse (ifdstream& is, const path_name& n, const compiler_id& cid) { unit r; - parse (is, n, r); + parse (is, n, r, cid); return r; } void - parse (ifdstream&, const path_name&, unit&); + parse (ifdstream&, const path_name&, unit&, const compiler_id&); private: void @@ -44,14 +48,6 @@ namespace build2 pair<string, bool> parse_module_name (token&, bool); - string - parse_module_part (token& t) - { - string n; - parse_module_part (t, n); - return n; - } - void parse_module_part (token&, string&); @@ -62,6 +58,7 @@ namespace build2 string checksum; // Translation unit checksum. private: + const compiler_id* cid_; lexer* l_; unit* u_; |