mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-03 18:00:24 +00:00
Make log_header()
use variadic templates.
This commit is contained in:
parent
2e28feed94
commit
b4fcfc3a33
3 changed files with 10 additions and 12 deletions
|
@ -122,7 +122,6 @@ extern int log_debug_suppressed;
|
|||
[[noreturn]] void logv_file_error(const string &filename, int lineno, const char *format, va_list ap);
|
||||
|
||||
|
||||
void log_header(RTLIL::Design *design, const char *format, ...) YS_ATTRIBUTE(format(printf, 2, 3));
|
||||
void log_warning(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
||||
void log_experimental(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
||||
|
||||
|
@ -154,6 +153,13 @@ inline void log(FmtString<TypeIdentity<Args>...> fmt, Args... args)
|
|||
log_formatted_string(fmt.format_string(), fmt.format(args...));
|
||||
}
|
||||
|
||||
void log_formatted_header(RTLIL::Design *design, std::string_view format, std::string str);
|
||||
template <typename... Args>
|
||||
inline void log_header(RTLIL::Design *design, FmtString<TypeIdentity<Args>...> fmt, Args... args)
|
||||
{
|
||||
log_formatted_header(design, fmt.format_string(), fmt.format(args...));
|
||||
}
|
||||
|
||||
static inline void log_suppressed() {
|
||||
if (log_debug_suppressed && !log_make_debug) {
|
||||
log("<suppressed ~%d debug messages>\n", log_debug_suppressed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue