Skip to content

Commit d0808be

Browse files
committed
make EndSwitch flush cases to the EndSwitch offset
1 parent dbfb5bd commit d0808be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Backend/SwitchIRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ SwitchIRBuilder::BeginSwitch()
163163
void
164164
SwitchIRBuilder::EndSwitch(uint32 offset, uint32 targetOffset)
165165
{
166-
FlushCases(targetOffset);
166+
FlushCases(offset);
167167
AssertMsg(m_caseNodes->Count() == 0, "Not all switch case nodes built by end of switch");
168168

169169
// only generate the final unconditional jump at the end of the switch

0 commit comments

Comments
 (0)