mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-25 11:26:22 +00:00
rtlil: allow friends to use Cell constructors with a factory token pattern
This commit is contained in:
parent
b3f605e0d2
commit
3e6b740430
3 changed files with 8 additions and 6 deletions
|
|
@ -3129,7 +3129,7 @@ RTLIL::Wire *RTLIL::Module::addWire(RTLIL::IdString name, const RTLIL::Wire *oth
|
|||
|
||||
RTLIL::Cell *RTLIL::Module::addCell(RTLIL::IdString name, RTLIL::IdString type)
|
||||
{
|
||||
RTLIL::Cell *cell = new RTLIL::Cell;
|
||||
RTLIL::Cell *cell = new RTLIL::Cell(Cell::ConstructToken{});
|
||||
cell->name = std::move(name);
|
||||
cell->type = type;
|
||||
add(cell);
|
||||
|
|
@ -4243,7 +4243,7 @@ std::string RTLIL::Process::to_rtlil_str() const
|
|||
return f.str();
|
||||
}
|
||||
|
||||
RTLIL::Cell::Cell() : module(nullptr)
|
||||
RTLIL::Cell::Cell(RTLIL::Cell::ConstructToken) : module(nullptr)
|
||||
{
|
||||
static unsigned int hashidx_count = 123456789;
|
||||
hashidx_count = mkhash_xorshift(hashidx_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue