3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-07 17:48:00 +00:00

Merge pull request #5591 from YosysHQ/krys/clean_empty_switch

Improve handling of empty switches
This commit is contained in:
KrystalDelusion 2026-01-09 11:52:27 +13:00 committed by GitHub
commit cc3d569ade
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 39 additions and 0 deletions

View file

@ -97,6 +97,7 @@ void proc_clean_switch(RTLIL::SwitchRule *sw, RTLIL::CaseRule *parent, bool &did
all_empty = false;
if (all_empty)
{
did_something = true;
for (auto cs : sw->cases)
delete cs;
sw->cases.clear();