mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Revert to stringf()
rather than stringstreams.
This commit is contained in:
parent
6081c1bbd3
commit
b94f38295a
|
@ -258,22 +258,18 @@ struct RenamePass : public Pass {
|
||||||
|
|
||||||
for (auto wire : module->selected_wires())
|
for (auto wire : module->selected_wires())
|
||||||
if (wire->name[0] == '$') {
|
if (wire->name[0] == '$') {
|
||||||
std::ostringstream buf;
|
RTLIL::IdString buf;
|
||||||
do {
|
do buf = stringf("\\%s%d%s", pattern_prefix.c_str(), counter++, pattern_suffix.c_str());
|
||||||
buf.str("");
|
while (module->wire(buf) != nullptr);
|
||||||
buf << "\\" << pattern_prefix << counter++ << pattern_suffix;
|
new_wire_names[wire] = buf;
|
||||||
} while (module->count_id(buf.str()) > 0);
|
|
||||||
new_wire_names[wire] = buf.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto cell : module->selected_cells())
|
for (auto cell : module->selected_cells())
|
||||||
if (cell->name[0] == '$') {
|
if (cell->name[0] == '$') {
|
||||||
std::ostringstream buf;
|
RTLIL::IdString buf;
|
||||||
do {
|
do buf = stringf("\\%s%d%s", pattern_prefix.c_str(), counter++, pattern_suffix.c_str());
|
||||||
buf.str("");
|
while (module->cell(buf) != nullptr);
|
||||||
buf << "\\" << pattern_prefix << counter++ << pattern_suffix;
|
new_cell_names[cell] = buf;
|
||||||
} while (module->count_id(buf.str()) > 0);
|
|
||||||
new_cell_names[cell] = buf.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &it : new_wire_names)
|
for (auto &it : new_wire_names)
|
||||||
|
|
Loading…
Reference in a new issue