Skip to content

Commit ea04913

Browse files
committed
[MERGE #6096 @MikeHolman] [release/1.11] make EndSwitch flush cases to the EndSwitch offset
Merge pull request #6096 from MikeHolman:endswitch_1.11 Cherry-picking #6072 to release/1.11
2 parents dbfb5bd + d0808be commit ea04913

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)