Add workaround for Liberty duplication

This commit is contained in:
Akash Levy 2026-02-13 06:51:42 -08:00
parent 0485576632
commit 5debd619e5
1 changed files with 4 additions and 2 deletions

View File

@ -1346,8 +1346,10 @@ void RTLIL::Design::add(RTLIL::Binding *binding)
RTLIL::Module *RTLIL::Design::addModule(RTLIL::IdString name)
{
if (modules_.count(name) != 0)
log_error("Attempted to add new module named '%s', but a module by that name already exists\n", name);
if (modules_.count(name) != 0) {
log_warning("Attempted to add new module named '%s', but a module by that name already exists\n", name);
return modules_.at(name);
}
log_assert(refcount_modules_ == 0);
RTLIL::Module *module = new RTLIL::Module;