mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-21 05:13:40 +00:00
Add printf format attributes to btorf/infof helper functions
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
This commit is contained in:
parent
8efe6ee7f5
commit
5e8a9c61cd
1 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,7 @@ struct BtorWorker
|
||||||
vector<string> info_lines;
|
vector<string> info_lines;
|
||||||
dict<int, int> info_clocks;
|
dict<int, int> info_clocks;
|
||||||
|
|
||||||
void btorf(const char *fmt, ...)
|
void btorf(const char *fmt, ...) YS_ATTRIBUTE(format(printf, 2, 3))
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
@ -87,7 +87,7 @@ struct BtorWorker
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void infof(const char *fmt, ...)
|
void infof(const char *fmt, ...) YS_ATTRIBUTE(format(printf, 2, 3))
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
@ -524,7 +524,7 @@ struct BtorWorker
|
||||||
if (cell->type == ID($reduce_xnor)) {
|
if (cell->type == ID($reduce_xnor)) {
|
||||||
int nid2 = next_nid++;
|
int nid2 = next_nid++;
|
||||||
btorf("%d %s %d %d%s\n", nid, btor_op.c_str(), sid, nid_a, getinfo(cell).c_str());
|
btorf("%d %s %d %d%s\n", nid, btor_op.c_str(), sid, nid_a, getinfo(cell).c_str());
|
||||||
btorf("%d not %d %d %d\n", nid2, sid, nid);
|
btorf("%d not %d %d\n", nid2, sid, nid);
|
||||||
nid = nid2;
|
nid = nid2;
|
||||||
} else {
|
} else {
|
||||||
btorf("%d %s %d %d%s\n", nid, btor_op.c_str(), sid, nid_a, getinfo(cell).c_str());
|
btorf("%d %s %d %d%s\n", nid, btor_op.c_str(), sid, nid_a, getinfo(cell).c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue