[AST] In IfConfigDecl, keep track of its members per the block they belong to.

Swift SVN r15446
This commit is contained in:
Argyrios Kyrtzidis
2014-03-25 03:55:31 +00:00
parent c5f8821410
commit 415a7036e2
2 changed files with 20 additions and 27 deletions

View File

@@ -1280,21 +1280,9 @@ ParserResult<IfConfigDecl> Parser::parseDeclIfConfig(
IfLoc,
ElseLoc,
EndLoc,
Configuration.getPtrOrNull());
if (ifBlockIsActive) {
ICD->setActiveMembers(Context.AllocateCopy(IfDecls));
} else {
ICD->setInactiveMembers(Context.AllocateCopy(IfDecls));
}
if (ElseLoc.isValid()) {
if (ifBlockIsActive) {
ICD->setInactiveMembers(Context.AllocateCopy(ElseDecls));
} else {
ICD->setActiveMembers(Context.AllocateCopy(ElseDecls));
}
}
Configuration.getPtrOrNull(),
Context.AllocateCopy(IfDecls),
Context.AllocateCopy(ElseDecls));
return makeParserResult(ICD);
}