diff options
author | Lofty <dan.ravensloft@gmail.com> | 2021-03-17 02:43:25 +0000 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-03-17 09:32:13 +0100 |
commit | 937392ad337c4f70569535e83f7016245addb2c7 (patch) | |
tree | 65ccc00baff929ee05d82287c825926dfb4883f6 /kernel | |
parent | 4f187d53c5a0580275857ec308b41f57808ec727 (diff) | |
download | yosys-937392ad337c4f70569535e83f7016245addb2c7.tar.gz yosys-937392ad337c4f70569535e83f7016245addb2c7.tar.bz2 yosys-937392ad337c4f70569535e83f7016245addb2c7.zip |
Replace assert in get_reference with more useful error message
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 10cb039d5..a747b9d3c 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -166,7 +166,8 @@ namespace RTLIL log_assert(p[0] == '$' || p[0] == '\\'); log_assert(p[1] != 0); for (const char *c = p; *c; c++) - log_assert((unsigned)*c > (unsigned)' '); + if ((unsigned)*c <= (unsigned)' ') + log_error("Found control character or space (0x%02hhx) in string '%s' which is not allowed in RTLIL identifiers\n", *c, p); #ifndef YOSYS_NO_IDS_REFCNT if (global_free_idx_list_.empty()) { |