Skip to content

Commit 979d72c

Browse files
committed
SILgenPattern: Mark location used by forwardIntoSubtree as autogenerated.
If a pattern reuses a value from a previous branch this could result in a step backwords or a previous scope being reopeneed. rdar://107764966 (cherry picked from commit 68aa944)
1 parent 64b2eb0 commit 979d72c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SILGen/SILGenPattern.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ static ConsumableManagedValue
741741
forwardIntoSubtree(SILGenFunction &SGF, SILLocation loc,
742742
CleanupStateRestorationScope &scope,
743743
ConsumableManagedValue outerCMV) {
744+
loc.markAutoGenerated();
744745
ManagedValue outerMV = outerCMV.getFinalManagedValue();
745746
if (!outerMV.hasCleanup()) return outerCMV;
746747

0 commit comments

Comments
 (0)