mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Added format __attribute__ to stringf()
This commit is contained in:
parent
7cb0d3aa1a
commit
bbd808072b
5 changed files with 8 additions and 6 deletions
|
@ -68,7 +68,7 @@ struct SatGen
|
|||
else
|
||||
vec.push_back(bit == (undef_mode ? RTLIL::State::Sx : RTLIL::State::S1) ? ez->CONST_TRUE : ez->CONST_FALSE);
|
||||
} else {
|
||||
std::string name = pf + stringf(bit.wire->width == 1 ? "%s" : "%s [%d]", RTLIL::id2cstr(bit.wire->name), bit.offset);
|
||||
std::string name = pf + (bit.wire->width == 1 ? stringf("%s", log_id(bit.wire)) : stringf("%s [%d]", log_id(bit.wire->name), bit.offset));
|
||||
vec.push_back(ez->frozen_literal(name));
|
||||
imported_signals[pf][bit] = vec.back();
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace RTLIL {
|
|||
struct Cell;
|
||||
}
|
||||
|
||||
std::string stringf(const char *fmt, ...);
|
||||
std::string stringf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
std::string vstringf(const char *fmt, va_list ap);
|
||||
template<typename T> int GetSize(const T &obj) { return obj.size(); }
|
||||
int GetSize(RTLIL::Wire *wire);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue