3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-23 09:51:29 +00:00

Merge pull request #5347 from rocallahan/fix-subcircuit

Fix `subcircuit` building without `#define _YOSYS_`
This commit is contained in:
Emil J 2025-09-16 17:01:45 +02:00 committed by GitHub
commit 7bbd0595bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -411,7 +411,7 @@ class SubCircuit::SolverWorker
std::string toString() const std::string toString() const
{ {
return my_stringf("%s[%d]:%s[%d]", fromPort, fromBit, toPort, toBit); return my_stringf("%s[%d]:%s[%d]", fromPort.c_str(), fromBit, toPort.c_str(), toBit);
} }
}; };
@ -444,7 +444,7 @@ class SubCircuit::SolverWorker
std::string str; std::string str;
bool firstPort = true; bool firstPort = true;
for (const auto &it : portSizes) { for (const auto &it : portSizes) {
str += my_stringf("%s%s[%d]", firstPort ? "" : ",", it.first, it.second); str += my_stringf("%s%s[%d]", firstPort ? "" : ",", it.first.c_str(), it.second);
firstPort = false; firstPort = false;
} }
return typeId + "(" + str + ")"; return typeId + "(" + str + ")";