Skip to content

Commit 51c855e

Browse files
logcmd.cc: Move quote stripping to LogPass
1 parent a44a066 commit 51c855e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kernel/register.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args)
299299
if (args.size() == 0 || args[0][0] == '#' || args[0][0] == ':')
300300
return;
301301

302-
if (args.size() == 2 && args[1][0] == '"' && args[1][args[1].size()-1] == '"')
303-
args[1] = args[1].substr(1, args[1].size()-2);
304-
305302
if (echo_mode) {
306303
log("%s", create_prompt(design, 0));
307304
for (size_t i = 0; i < args.size(); i++)

passes/cmds/logcmd.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ struct LogPass : public Pass {
9797
text += args[argidx] + ' ';
9898
if (!text.empty()) text.resize(text.size()-1);
9999

100+
if (text[0] == '"' && text[text.size()-1] == '"')
101+
text = text.substr(1, text.size()-2);
102+
100103
const char *fmtline = newline ? "%s\n" : "%s";
101104

102105
if (to_stdout) fprintf(stdout, fmtline, text.c_str());

0 commit comments

Comments
 (0)