mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
show: truncate very long module names
This commit is contained in:
parent
22c9237716
commit
9c7f0e7670
|
@ -201,6 +201,12 @@ struct ShowWorker
|
||||||
if (id[0] == '\\')
|
if (id[0] == '\\')
|
||||||
id = id.substr(1);
|
id = id.substr(1);
|
||||||
|
|
||||||
|
// TODO: optionally include autoname + print correspondence in case of ambiguity
|
||||||
|
size_t max_label_len = abbreviateIds ? 256 : 16384;
|
||||||
|
if (id.size() > max_label_len) {
|
||||||
|
id = id.substr(0,max_label_len-3) + "...";
|
||||||
|
}
|
||||||
|
|
||||||
std::string str;
|
std::string str;
|
||||||
for (char ch : id) {
|
for (char ch : id) {
|
||||||
if (ch == '\\') {
|
if (ch == '\\') {
|
||||||
|
|
Loading…
Reference in a new issue