3
0
Fork 0
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:
Emil J. Tywoniak 2025-12-21 16:56:14 +01:00
parent b3f605e0d2
commit 3e6b740430
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;