@@ -1244,8 +1244,8 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
12441244 PackType::get (SGF.getASTContext (), expansion->getType ())
12451245 ->getCanonicalType ());
12461246
1247- JumpDest loopDest = createJumpDest (S->getBody ());
1248- JumpDest endDest = createJumpDest (S->getBody ());
1247+ JumpDest continueDest = createJumpDest (S->getBody ());
1248+ JumpDest breakDest = createJumpDest (S->getBody ());
12491249
12501250 SGF.emitDynamicPackLoop (
12511251 SILLocation (expansion), formalPackType, 0 ,
@@ -1254,20 +1254,20 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
12541254 SILValue packIndex) {
12551255 Scope innerForScope (SGF.Cleanups , CleanupLocation (S->getBody ()));
12561256 auto letValueInit =
1257- SGF.emitPatternBindingInitialization (S->getPattern (), loopDest );
1257+ SGF.emitPatternBindingInitialization (S->getPattern (), continueDest );
12581258
12591259 SGF.emitExprInto (expansion->getPatternExpr (), letValueInit.get ());
12601260
12611261 // Set the destinations for 'break' and 'continue'.
1262- SGF.BreakContinueDestStack .push_back ({S, endDest, loopDest });
1262+ SGF.BreakContinueDestStack .push_back ({S, breakDest, continueDest });
12631263 visit (S->getBody ());
12641264 SGF.BreakContinueDestStack .pop_back ();
12651265
12661266 return ;
12671267 },
1268- loopDest .getBlock ());
1268+ continueDest .getBlock ());
12691269
1270- emitOrDeleteBlock (SGF, endDest , S);
1270+ emitOrDeleteBlock (SGF, breakDest , S);
12711271
12721272 return ;
12731273 }
0 commit comments