1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Fixed SetSwitchDefaultDest issue

This commit is contained in:
Brian Fiete 2021-01-06 04:31:23 -08:00
parent a14544efa6
commit fb2e70c04a

View file

@ -4608,7 +4608,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
lastNotEqBlock = notEqBB; lastNotEqBlock = notEqBB;
} }
if (lastDefaultBlock) if ((lastDefaultBlock) && (switchStatement))
mBfIRBuilder->SetSwitchDefaultDest(switchStatement, lastDefaultBlock); mBfIRBuilder->SetSwitchDefaultDest(switchStatement, lastDefaultBlock);
auto prevInsertBlock = mBfIRBuilder->GetInsertBlock(); auto prevInsertBlock = mBfIRBuilder->GetInsertBlock();