rename PatternMatchStack back to SwitchStack. I was too quick to rename it: it

is only for processing of fallthrough statements, which really do only apply to
switch.


Swift SVN r26127
This commit is contained in:
Chris Lattner
2015-03-14 03:32:28 +00:00
parent a6d95e4630
commit 5745300718
2 changed files with 5 additions and 5 deletions

View File

@@ -1894,7 +1894,7 @@ void SILGenFunction::emitSwitchStmt(SwitchStmt *S) {
BreakContinueDestStack.push_back(std::make_tuple(S, contDest, JumpDest(S)));
PatternMatchContext switchContext = { emission };
PatternMatchStack.push_back(&switchContext);
SwitchStack.push_back(&switchContext);
// Emit the subject value. Dispatching will consume it.
ManagedValue subjectMV = emitRValueAsSingleValue(S->getSubjectExpr());
@@ -1931,7 +1931,7 @@ void SILGenFunction::emitSwitchStmt(SwitchStmt *S) {
emission.emitSharedCaseBlocks();
// Bookkeeping.
PatternMatchStack.pop_back();
SwitchStack.pop_back();
BreakContinueDestStack.pop_back();
// If the continuation block has no predecessors, this
@@ -1944,8 +1944,8 @@ void SILGenFunction::emitSwitchStmt(SwitchStmt *S) {
}
void SILGenFunction::emitSwitchFallthrough(FallthroughStmt *S) {
assert(!PatternMatchStack.empty() && "fallthrough outside of switch?!");
PatternMatchContext *context = PatternMatchStack.back();
assert(!SwitchStack.empty() && "fallthrough outside of switch?!");
PatternMatchContext *context = SwitchStack.back();
// Get the destination block.
CaseStmt *caseStmt = S->getFallthroughDest();