@@ -1244,8 +1244,8 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
1244
1244
PackType::get (SGF.getASTContext (), expansion->getType ())
1245
1245
->getCanonicalType ());
1246
1246
1247
- JumpDest loopDest = createJumpDest (S->getBody ());
1248
- JumpDest endDest = createJumpDest (S->getBody ());
1247
+ JumpDest continueDest = createJumpDest (S->getBody ());
1248
+ JumpDest breakDest = createJumpDest (S->getBody ());
1249
1249
1250
1250
SGF.emitDynamicPackLoop (
1251
1251
SILLocation (expansion), formalPackType, 0 ,
@@ -1254,20 +1254,20 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) {
1254
1254
SILValue packIndex) {
1255
1255
Scope innerForScope (SGF.Cleanups , CleanupLocation (S->getBody ()));
1256
1256
auto letValueInit =
1257
- SGF.emitPatternBindingInitialization (S->getPattern (), loopDest );
1257
+ SGF.emitPatternBindingInitialization (S->getPattern (), continueDest );
1258
1258
1259
1259
SGF.emitExprInto (expansion->getPatternExpr (), letValueInit.get ());
1260
1260
1261
1261
// Set the destinations for 'break' and 'continue'.
1262
- SGF.BreakContinueDestStack .push_back ({S, endDest, loopDest });
1262
+ SGF.BreakContinueDestStack .push_back ({S, breakDest, continueDest });
1263
1263
visit (S->getBody ());
1264
1264
SGF.BreakContinueDestStack .pop_back ();
1265
1265
1266
1266
return ;
1267
1267
},
1268
- loopDest .getBlock ());
1268
+ continueDest .getBlock ());
1269
1269
1270
- emitOrDeleteBlock (SGF, endDest , S);
1270
+ emitOrDeleteBlock (SGF, breakDest , S);
1271
1271
1272
1272
return ;
1273
1273
}
0 commit comments