1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +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;
}
if (lastDefaultBlock)
if ((lastDefaultBlock) && (switchStatement))
mBfIRBuilder->SetSwitchDefaultDest(switchStatement, lastDefaultBlock);
auto prevInsertBlock = mBfIRBuilder->GetInsertBlock();