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