When parsing build configuration blocks, pass the actual BraceItemListKind through, rather than signify whether something is "top level" or not. This allows proper codegen for overloaded operators at the module top-level.

Swift SVN r14611
This commit is contained in:
Joe Pamer
2014-03-03 21:48:36 +00:00
parent 25c5692fe6
commit 3a0363b405
3 changed files with 19 additions and 11 deletions

View File

@@ -565,7 +565,7 @@ public:
ParserResult<BraceStmt> parseBraceItemList(Diag<> ID);
ParserResult<BraceStmt> parseIfConfigStmtBlock(bool isActive,
bool IsTopLevel);
BraceItemListKind Kind);
void parseTopLevelCodeDeclDelayed();
@@ -932,7 +932,8 @@ public:
ParserResult<Stmt> parseStmtReturn();
ParserStatus parseStmtCondition(StmtCondition &Result, Diag<> ID);
ParserResult<Stmt> parseStmtIf();
ParserResult<Stmt> parseStmtIfConfig(bool isTopLevel = false);
ParserResult<Stmt> parseStmtIfConfig(BraceItemListKind Kind
= BraceItemListKind::Brace);
ParserResult<Stmt> parseStmtWhile();
ParserResult<Stmt> parseStmtDoWhile();
ParserResult<Stmt> parseStmtFor();