3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-13 21:21:27 +00:00

Make log_file_warning() use variadic templates.

This commit is contained in:
Robert O'Callahan 2025-07-22 04:03:43 +00:00 committed by Jannis Harder
parent c81c1a5005
commit 2e939faa45
2 changed files with 11 additions and 10 deletions

View file

@ -316,15 +316,10 @@ void log_formatted_warning(std::string_view prefix, std::string message)
}
}
void log_file_warning(const std::string &filename, int lineno,
const char *format, ...)
void log_formatted_file_warning(std::string_view filename, int lineno, std::string str)
{
va_list ap;
va_start(ap, format);
std::string prefix = stringf("%s:%d: Warning: ",
filename.c_str(), lineno);
log_formatted_warning(prefix, vstringf(format, ap));
va_end(ap);
std::string prefix = stringf("%s:%d: Warning: ", filename, lineno);
log_formatted_warning(prefix, std::move(str));
}
void log_file_info(const std::string &filename, int lineno,