mirror of
https://github.com/YosysHQ/yosys
synced 2026-08-14 18:05:55 +00:00
rtlil: allow friends to use Cell constructors with a factory token pattern
This commit is contained in:
parent
77dd01edfc
commit
20b0a9934b
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