From: Clifford Wolf Date: Fri, 30 Jan 2015 21:22:52 +0000 (+0100) Subject: More log_id() stuff X-Git-Tag: yosys-0.5~55 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aabd5097ed84182c1bd32dc94abcc1205dc25d09;p=yosys.git More log_id() stuff --- diff --git a/kernel/log.cc b/kernel/log.cc index 061c5074c..ada2cabb2 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -389,9 +389,13 @@ const char *log_id(RTLIL::IdString str) { log_id_cache.insert(str); const char *p = str.c_str(); - if (p[0] == '\\' && p[1] != '$' && p[1] != '\\' && p[1] != 0) - return p+1; - return p; + if (p[0] != '\\') + return p; + if (p[1] == '$' || p[1] == '\\' || p[1] == 0) + return p; + if (p[1] >= '0' && p[1] <= '9') + return p; + return p+1; } void log_cell(RTLIL::Cell *cell, std::string indent)