mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-03 01:40:23 +00:00
Make log_experimental() just take an std::string, since it doesn't need to be varargs.
This commit is contained in:
parent
64c660f213
commit
fa90e2503e
3 changed files with 7 additions and 13 deletions
|
@ -402,16 +402,11 @@ void log_file_error(const string &filename, int lineno,
|
||||||
logv_file_error(filename, lineno, format, ap);
|
logv_file_error(filename, lineno, format, ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void log_experimental(const char *format, ...)
|
void log_experimental(const std::string &str)
|
||||||
{
|
{
|
||||||
va_list ap;
|
if (log_experimentals_ignored.count(str) == 0 && log_experimentals.count(str) == 0) {
|
||||||
va_start(ap, format);
|
log_warning("Feature '%s' is experimental.\n", str);
|
||||||
string s = vstringf(format, ap);
|
log_experimentals.insert(str);
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
if (log_experimentals_ignored.count(s) == 0 && log_experimentals.count(s) == 0) {
|
|
||||||
log_warning("Feature '%s' is experimental.\n", s.c_str());
|
|
||||||
log_experimentals.insert(s);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,6 @@ extern int log_debug_suppressed;
|
||||||
|
|
||||||
[[noreturn]] void logv_file_error(const string &filename, int lineno, const char *format, va_list ap);
|
[[noreturn]] void logv_file_error(const string &filename, int lineno, const char *format, va_list ap);
|
||||||
|
|
||||||
|
|
||||||
void log_experimental(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
|
||||||
|
|
||||||
void set_verific_logging(void (*cb)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg));
|
void set_verific_logging(void (*cb)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg));
|
||||||
extern void (*log_verific_callback)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg);
|
extern void (*log_verific_callback)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg);
|
||||||
|
|
||||||
|
@ -170,6 +167,8 @@ inline void log_warning_noprefix(FmtString<TypeIdentity<Args>...> fmt, Args... a
|
||||||
log_formatted_warning("", fmt.format(args...));
|
log_formatted_warning("", fmt.format(args...));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void log_experimental(const std::string &str);
|
||||||
|
|
||||||
static inline void log_suppressed() {
|
static inline void log_suppressed() {
|
||||||
if (log_debug_suppressed && !log_make_debug) {
|
if (log_debug_suppressed && !log_make_debug) {
|
||||||
log("<suppressed ~%d debug messages>\n", log_debug_suppressed);
|
log("<suppressed ~%d debug messages>\n", log_debug_suppressed);
|
||||||
|
|
|
@ -253,7 +253,7 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args)
|
||||||
log_cmd_error("No such command: %s (type 'help' for a command overview)\n", args[0].c_str());
|
log_cmd_error("No such command: %s (type 'help' for a command overview)\n", args[0].c_str());
|
||||||
|
|
||||||
if (pass_register[args[0]]->experimental_flag)
|
if (pass_register[args[0]]->experimental_flag)
|
||||||
log_experimental("%s", args[0].c_str());
|
log_experimental(args[0]);
|
||||||
|
|
||||||
size_t orig_sel_stack_pos = design->selection_stack.size();
|
size_t orig_sel_stack_pos = design->selection_stack.size();
|
||||||
auto state = pass_register[args[0]]->pre_execute();
|
auto state = pass_register[args[0]]->pre_execute();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue