mirror of https://github.com/YosysHQ/yosys.git
Add workaround for Liberty duplication
This commit is contained in:
parent
0485576632
commit
5debd619e5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue