3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-04 23:14:00 +00:00

Fix subcircuit building without #define _YOSYS_

We can't use the new stringf functionality with `my_sprintf()` since in some builds
that falls back to C-style varargs.
This commit is contained in:
Robert O'Callahan 2025-09-15 23:13:20 +00:00
parent fa02d71f65
commit 9cb3a239cc

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 + ")";