diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-01-30 22:22:52 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-01-30 22:22:52 +0100 |
commit | aabd5097ed84182c1bd32dc94abcc1205dc25d09 (patch) | |
tree | 9e6ea42304cbf3937dfc115d9061aeb2da6a46dc | |
parent | 114a78d11a629f030e5fd0b6e5655ed70ee7ca9b (diff) | |
download | yosys-aabd5097ed84182c1bd32dc94abcc1205dc25d09.tar.gz yosys-aabd5097ed84182c1bd32dc94abcc1205dc25d09.tar.bz2 yosys-aabd5097ed84182c1bd32dc94abcc1205dc25d09.zip |
More log_id() stuff
-rw-r--r-- | kernel/log.cc | 10 |
1 files changed, 7 insertions, 3 deletions
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) |