mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] In IfConfigDecl, keep track of its members per the block they belong to.
Swift SVN r15446
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user