mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-25 19:36:21 +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
|
|
@ -4,7 +4,7 @@ YOSYS_NAMESPACE_BEGIN
|
|||
|
||||
using namespace RTLIL;
|
||||
Cell* Patch::addCell(IdString name, IdString type) {
|
||||
auto& cell = cells_.emplace_back();
|
||||
auto& cell = cells_.emplace_back(Cell::ConstructToken{});
|
||||
cell.name = std::move(name);
|
||||
cell.type = type;
|
||||
return &cell;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue