3
0
Fork 0
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:
Emil J. Tywoniak 2025-12-21 16:56:14 +01:00
parent 77dd01edfc
commit 20b0a9934b
3 changed files with 8 additions and 6 deletions

View file

@ -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;