3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-22 02:57:51 +00:00
This commit is contained in:
Robert O'Callahan 2025-07-31 16:42:58 +10:00 committed by GitHub
commit 42facc79b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 154 additions and 159 deletions

View file

@ -97,13 +97,13 @@ struct LogPass : public Pass {
text += args[argidx] + ' ';
if (!text.empty()) text.resize(text.size()-1);
const char *fmtline = newline ? "%s\n" : "%s";
const char *line_end = newline ? "\n" : "";
if (to_stdout) fprintf(stdout, fmtline, text.c_str());
if (to_stderr) fprintf(stderr, fmtline, text.c_str());
if (to_stdout) fprintf(stdout, "%s%s", text.c_str(), line_end);
if (to_stderr) fprintf(stderr, "%s%s", text.c_str(), line_end);
if (to_log) {
if (!header) log(fmtline, text.c_str());
else log_header(design, fmtline, text.c_str());
if (!header) log("%s%s", text.c_str(), line_end);
else log_header(design, "%s%s", text.c_str(), line_end);
}
}
} LogPass;

View file

@ -474,7 +474,7 @@ struct StatPass : public Pass {
if (json_mode) {
log("\n");
log(top_mod == nullptr ? " }\n" : " },\n");
log("%s", top_mod == nullptr ? " }\n" : " },\n");
}
if (top_mod != nullptr)