diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-07 09:24:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-07 09:24:08 +0200 |
commit | f5e6c30650dbb135cb758431944f8d350eeee61e (patch) | |
tree | f73c26a8dbe549cb34335af3962f744c395c5171 /libbuild2/cc/parser.hxx | |
parent | d4234c2c011d0fdcce6dc9006741373f048db942 (diff) |
C++20 named modules support for MSVC, take 2
Diffstat (limited to 'libbuild2/cc/parser.hxx')
-rw-r--r-- | libbuild2/cc/parser.hxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libbuild2/cc/parser.hxx b/libbuild2/cc/parser.hxx index 1fbf1a3..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 @@ -54,6 +58,7 @@ namespace build2 string checksum; // Translation unit checksum. private: + const compiler_id* cid_; lexer* l_; unit* u_; |