mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Add log_experimental() and experimental() API and "yosys -x"
Signed-off-by: Claire Wolf <clifford@clifford.at>
This commit is contained in:
parent
07a12ebd4f
commit
cef607c8b7
6 changed files with 52 additions and 4 deletions
|
@ -42,7 +42,7 @@ std::vector<FILE*> log_files;
|
|||
std::vector<std::ostream*> log_streams;
|
||||
std::map<std::string, std::set<std::string>> log_hdump;
|
||||
std::vector<std::regex> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
|
||||
std::set<std::string> log_warnings;
|
||||
std::set<std::string> log_warnings, log_experimentals;
|
||||
int log_warnings_count = 0;
|
||||
bool log_hdump_all = false;
|
||||
FILE *log_errfile = NULL;
|
||||
|
@ -377,6 +377,19 @@ void log_warning(const char *format, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void log_experimental(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
string s = vstringf(format, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (log_experimentals.count(s) == 0) {
|
||||
log_warning("Feature '%s' is experimental.\n", s.c_str());
|
||||
log_experimentals.insert(s);
|
||||
}
|
||||
}
|
||||
|
||||
void log_warning_noprefix(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue