3
0
Fork 0
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:
Krystine Sherwin 2024-08-17 11:33:28 +12:00
parent 48f358bb09
commit b78725f772
No known key found for this signature in database

View file

@ -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());