aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorZachary Snow <zach@zachjs.com>2020-08-29 13:33:31 -0400
committerZachary Snow <zach@zachjs.com>2020-08-29 13:33:31 -0400
commitc7ceed3fd3a020e70916be93fac785deba2f9972 (patch)
treefac6e44b14698b82f3c7064d72de4c32c08d31ed /frontends
parent082cbcb4c7c4fa6984f86f8edb2e1d16e8ad3a41 (diff)
downloadyosys-c7ceed3fd3a020e70916be93fac785deba2f9972.tar.gz
yosys-c7ceed3fd3a020e70916be93fac785deba2f9972.tar.bz2
yosys-c7ceed3fd3a020e70916be93fac785deba2f9972.zip
Simple support for %l format specifier
Yosys doesn't support libraries, so this provides the same behavior as %m, as some other tools have opted to do.
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/simplify.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 7f9795d29..e50ebff3a 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -110,6 +110,12 @@ std::string AstNode::process_format_str(const std::string &sformat, int next_arg
goto unsupported_format;
break;
+ case 'l':
+ case 'L':
+ if (got_len)
+ goto unsupported_format;
+ break;
+
default:
unsupported_format:
log_file_error(filename, location.first_line, "System task `%s' called with invalid/unsupported format specifier.\n", str.c_str());
@@ -155,6 +161,11 @@ std::string AstNode::process_format_str(const std::string &sformat, int next_arg
sout += log_id(current_module->name);
break;
+ case 'l':
+ case 'L':
+ sout += log_id(current_module->name);
+ break;
+
default:
log_abort();
}