@@ -1253,8 +1253,8 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
12531253 PackType::get (SGF.getASTContext (), expansion->getType ())
12541254 ->getCanonicalType ());
12551255
1256- JumpDest loopDest = createJumpDest (S->getBody ());
1257- JumpDest endDest = createJumpDest (S->getBody ());
1256+ JumpDest continueDest = createJumpDest (S->getBody ());
1257+ JumpDest breakDest = createJumpDest (S->getBody ());
12581258
12591259 SGF.emitDynamicPackLoop (
12601260 SILLocation (expansion), formalPackType, 0 ,
@@ -1263,20 +1263,20 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
12631263 SILValue packIndex) {
12641264 Scope innerForScope (SGF.Cleanups , CleanupLocation (S->getBody ()));
12651265 auto letValueInit =
1266- SGF.emitPatternBindingInitialization (S->getPattern (), loopDest );
1266+ SGF.emitPatternBindingInitialization (S->getPattern (), continueDest );
12671267
12681268 SGF.emitExprInto (expansion->getPatternExpr (), letValueInit.get ());
12691269
12701270 // Set the destinations for 'break' and 'continue'.
1271- SGF.BreakContinueDestStack .push_back ({S, endDest, loopDest });
1271+ SGF.BreakContinueDestStack .push_back ({S, breakDest, continueDest });
12721272 visit (S->getBody ());
12731273 SGF.BreakContinueDestStack .pop_back ();
12741274
12751275 return ;
12761276 },
1277- loopDest .getBlock ());
1277+ continueDest .getBlock ());
12781278
1279- emitOrDeleteBlock (SGF, endDest , S);
1279+ emitOrDeleteBlock (SGF, breakDest , S);
12801280
12811281 return ;
12821282 }
0 commit comments