mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-20 07:36:39 +00:00
logcmd.cc: Quote stripping
If a command has a single argument, and that argument is quoted, strip the quotes.
This commit is contained in:
parent
48f358bb09
commit
b78725f772
|
@ -97,6 +97,9 @@ struct LogPass : public Pass {
|
|||
text += args[argidx] + ' ';
|
||||
if (!text.empty()) text.resize(text.size()-1);
|
||||
|
||||
if (text[0] == '"' && text[text.size()-1] == '"')
|
||||
text = text.substr(1, text.size()-2);
|
||||
|
||||
const char *fmtline = newline ? "%s\n" : "%s";
|
||||
|
||||
if (to_stdout) fprintf(stdout, fmtline, text.c_str());
|
||||
|
|
Loading…
Reference in a new issue