Skip to content

Commit 1feaec3

Browse files
authored
Merge pull request #15175 from gottesmm/pr-a06a9d884e5fe4a32754f5918f5e8f51abcc5b9c
2 parents 7d16d13 + 5c0a875 commit 1feaec3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILGen/SwitchEnumBuilder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void SwitchEnumBuilder::emit() && {
106106
input = builder.createOwnedPHIArgument(optional.getType());
107107
}
108108
handler(input, presentScope);
109-
assert(!builder.hasValidInsertionPoint());
109+
builder.clearInsertionPoint();
110110
}
111111

112112
for (NormalCaseData &caseData : caseDataArray) {
@@ -133,7 +133,7 @@ void SwitchEnumBuilder::emit() && {
133133
}
134134
}
135135
handler(input, presentScope);
136-
assert(!builder.hasValidInsertionPoint());
136+
builder.clearInsertionPoint();
137137
}
138138

139139
// If we are asked to create a default block and it is specified that the
@@ -154,6 +154,6 @@ void SwitchEnumBuilder::emit() && {
154154
input = builder.createOwnedPHIArgument(optional.getType());
155155
}
156156
handler(input, presentScope);
157-
assert(!builder.hasValidInsertionPoint());
157+
builder.clearInsertionPoint();
158158
}
159159
}

0 commit comments

Comments
 (0)