3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-24 14:53:42 +00:00

Design::selection_stack should never be empty

Add a `log_assert` for it in `Design::check()`.
Remove unneeded checks in other places.
This commit is contained in:
Krystine Sherwin 2025-03-14 14:08:16 +13:00
parent 7eaf33e4da
commit add5eba9b2
No known key found for this signature in database
5 changed files with 15 additions and 19 deletions

View file

@ -1322,17 +1322,13 @@ struct RTLIL::Design
}
template<typename T1> void select(T1 *module) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection();
sel.select(module);
}
RTLIL::Selection &sel = selection();
sel.select(module);
}
template<typename T1, typename T2> void select(T1 *module, T2 *member) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection();
sel.select(module, member);
}
RTLIL::Selection &sel = selection();
sel.select(module, member);
}