From 457a2263d344cdc853669b3bccd32ea4717cd92f Mon Sep 17 00:00:00 2001 From: Sima Nerush <2002ssn@gmail.com> Date: Sat, 3 Feb 2024 14:23:28 -0800 Subject: [PATCH] [SILGen] Rename `loopDest` and `endDest` to `continueDest` and `breakDest` to make more sense to the reader. --- lib/SILGen/SILGenStmt.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/SILGen/SILGenStmt.cpp b/lib/SILGen/SILGenStmt.cpp index 1babb747197f2..76be68f73ae9f 100644 --- a/lib/SILGen/SILGenStmt.cpp +++ b/lib/SILGen/SILGenStmt.cpp @@ -1253,8 +1253,8 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) { PackType::get(SGF.getASTContext(), expansion->getType()) ->getCanonicalType()); - JumpDest loopDest = createJumpDest(S->getBody()); - JumpDest endDest = createJumpDest(S->getBody()); + JumpDest continueDest = createJumpDest(S->getBody()); + JumpDest breakDest = createJumpDest(S->getBody()); SGF.emitDynamicPackLoop( SILLocation(expansion), formalPackType, 0, @@ -1263,20 +1263,20 @@ void StmtEmitter::visitForEachStmt(ForEachStmt *S) { SILValue packIndex) { Scope innerForScope(SGF.Cleanups, CleanupLocation(S->getBody())); auto letValueInit = - SGF.emitPatternBindingInitialization(S->getPattern(), loopDest); + SGF.emitPatternBindingInitialization(S->getPattern(), continueDest); SGF.emitExprInto(expansion->getPatternExpr(), letValueInit.get()); // Set the destinations for 'break' and 'continue'. - SGF.BreakContinueDestStack.push_back({S, endDest, loopDest}); + SGF.BreakContinueDestStack.push_back({S, breakDest, continueDest}); visit(S->getBody()); SGF.BreakContinueDestStack.pop_back(); return; }, - loopDest.getBlock()); + continueDest.getBlock()); - emitOrDeleteBlock(SGF, endDest, S); + emitOrDeleteBlock(SGF, breakDest, S); return; }