mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-22 02:57:51 +00:00
Merge 7f45715fec
into 262b00d5e5
This commit is contained in:
commit
42facc79b9
12 changed files with 154 additions and 159 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue