mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-16 14:41:33 +00:00
Remove .c_str() calls from log()/log_error()
There are some leftovers, but this is an easy regex-based approach that removes most of them.
This commit is contained in:
parent
c2291c10a6
commit
e0ae7b7af4
140 changed files with 623 additions and 623 deletions
|
@ -395,7 +395,7 @@ public:
|
|||
Node y = neg_if(y_flipped, sign(b));
|
||||
return factory.extend(y, y_width, true);
|
||||
} else
|
||||
log_error("unhandled cell in CellSimplifier %s\n", cellType.c_str());
|
||||
log_error("unhandled cell in CellSimplifier %s\n", cellType);
|
||||
} else {
|
||||
if(cellType.in(ID($mod), ID($modfloor)))
|
||||
return factory.extend(factory.unsigned_mod(a, b), y_width, false);
|
||||
|
@ -458,9 +458,9 @@ public:
|
|||
return factory.value(state);
|
||||
}
|
||||
} else if(cellType == ID($check)) {
|
||||
log_error("The design contains a $check cell `%s'. This is not supported by the functional backend. Call `chformal -lower' to avoid this error.\n", cellName.c_str());
|
||||
log_error("The design contains a $check cell `%s'. This is not supported by the functional backend. Call `chformal -lower' to avoid this error.\n", cellName);
|
||||
} else {
|
||||
log_error("`%s' cells are not supported by the functional backend\n", cellType.c_str());
|
||||
log_error("`%s' cells are not supported by the functional backend\n", cellType);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -744,7 +744,7 @@ void IR::topological_sort() {
|
|||
log_warning("Combinational loop:\n");
|
||||
for (int *i = begin; i != end; ++i) {
|
||||
Node node(_graph[*i]);
|
||||
log("- %s = %s\n", RTLIL::unescape_id(node.name()).c_str(), node.to_string().c_str());
|
||||
log("- %s = %s\n", RTLIL::unescape_id(node.name()), node.to_string());
|
||||
}
|
||||
log("\n");
|
||||
scc = true;
|
||||
|
@ -836,7 +836,7 @@ void Writer::print_impl(const char *fmt, vector<std::function<void()>> &fns)
|
|||
else
|
||||
p = pe;
|
||||
if(index >= fns.size())
|
||||
log_error("invalid format string: index %zu out of bounds (%zu): \"%s\"\n", index, fns.size(), quote_fmt(fmt).c_str());
|
||||
log_error("invalid format string: index %zu out of bounds (%zu): \"%s\"\n", index, fns.size(), quote_fmt(fmt));
|
||||
fns[index]();
|
||||
next_index = index + 1;
|
||||
}
|
||||
|
@ -844,7 +844,7 @@ void Writer::print_impl(const char *fmt, vector<std::function<void()>> &fns)
|
|||
case '}':
|
||||
p++;
|
||||
if(*p != '}')
|
||||
log_error("invalid format string: unescaped }: \"%s\"\n", quote_fmt(fmt).c_str());
|
||||
log_error("invalid format string: unescaped }: \"%s\"\n", quote_fmt(fmt));
|
||||
*os << '}';
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue