aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/log.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2020-03-13 17:19:54 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2020-03-13 17:19:54 +0100
commit8f221118d206e8f474fb5c1853cd67018b7801c9 (patch)
treeafd179067f9520dd102de3b1368471c408ad5819 /kernel/log.cc
parent5b73e7c63a9f939da93dd8dca7d7b1e4c2a949ae (diff)
downloadyosys-8f221118d206e8f474fb5c1853cd67018b7801c9.tar.gz
yosys-8f221118d206e8f474fb5c1853cd67018b7801c9.tar.bz2
yosys-8f221118d206e8f474fb5c1853cd67018b7801c9.zip
Add YS_ prefix to macros, add explanation and apply to older version as well
Diffstat (limited to 'kernel/log.cc')
-rw-r--r--kernel/log.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index d28a44eb4..d84a4381e 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -41,8 +41,8 @@ YOSYS_NAMESPACE_BEGIN
std::vector<FILE*> log_files;
std::vector<std::ostream*> log_streams;
std::map<std::string, std::set<std::string>> log_hdump;
-std::vector<REGEX_TYPE> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
-std::vector<std::pair<REGEX_TYPE,LogExpectedItem>> log_expect_log, log_expect_warning, log_expect_error;
+std::vector<YS_REGEX_TYPE> log_warn_regexes, log_nowarn_regexes, log_werror_regexes;
+std::vector<std::pair<YS_REGEX_TYPE,LogExpectedItem>> log_expect_log, log_expect_warning, log_expect_error;
std::set<std::string> log_warnings, log_experimentals, log_experimentals_ignored;
int log_warnings_count = 0;
int log_warnings_count_noexpect = 0;
@@ -177,11 +177,11 @@ void logv(const char *format, va_list ap)
if (!linebuffer.empty() && linebuffer.back() == '\n') {
for (auto &re : log_warn_regexes)
- if (REGEX_NS::regex_search(linebuffer, re))
+ if (YS_REGEX_NS::regex_search(linebuffer, re))
log_warning("Found log message matching -W regex:\n%s", str.c_str());
for (auto &item : log_expect_log)
- if (REGEX_NS::regex_search(linebuffer, item.first))
+ if (YS_REGEX_NS::regex_search(linebuffer, item.first))
item.second.current_count++;
linebuffer.clear();
@@ -238,7 +238,7 @@ static void logv_warning_with_prefix(const char *prefix,
bool suppressed = false;
for (auto &re : log_nowarn_regexes)
- if (REGEX_NS::regex_search(message, re))
+ if (YS_REGEX_NS::regex_search(message, re))
suppressed = true;
if (suppressed)
@@ -251,12 +251,12 @@ static void logv_warning_with_prefix(const char *prefix,
log_make_debug = 0;
for (auto &re : log_werror_regexes)
- if (REGEX_NS::regex_search(message, re))
+ if (YS_REGEX_NS::regex_search(message, re))
log_error("%s", message.c_str());
bool warning_match = false;
for (auto &item : log_expect_warning)
- if (REGEX_NS::regex_search(message, item.first)) {
+ if (YS_REGEX_NS::regex_search(message, item.first)) {
item.second.current_count++;
warning_match = true;
}
@@ -349,7 +349,7 @@ static void logv_error_with_prefix(const char *prefix,
log_error_atexit();
for (auto &item : log_expect_error)
- if (REGEX_NS::regex_search(log_last_error, item.first))
+ if (YS_REGEX_NS::regex_search(log_last_error, item.first))
item.second.current_count++;
if (check_expected_logs)