aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-06-07 13:39:46 +0200
committerGitHub <noreply@github.com>2019-06-07 13:39:46 +0200
commit6d49145497e48bb063ebbed5164b45569e91b5ca (patch)
tree151c2b9268fe7c2c42d94a601220de6c35efd9c8 /kernel
parentf01a61f093528e5111e5dac8aedbf8c7c468be1c (diff)
parent211d85cfcc1ae701bb9392347bcbb9750e3045b0 (diff)
downloadyosys-6d49145497e48bb063ebbed5164b45569e91b5ca.tar.gz
yosys-6d49145497e48bb063ebbed5164b45569e91b5ca.tar.bz2
yosys-6d49145497e48bb063ebbed5164b45569e91b5ca.zip
Merge pull request #1077 from YosysHQ/clifford/pr983
elaboration system tasks
Diffstat (limited to 'kernel')
-rw-r--r--kernel/log.cc13
-rw-r--r--kernel/log.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index fa74a6a3c..a7820950c 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -277,11 +277,22 @@ void log_file_warning(const std::string &filename, int lineno,
va_list ap;
va_start(ap, format);
std::string prefix = stringf("%s:%d: Warning: ",
- filename.c_str(), lineno);
+ filename.c_str(), lineno);
logv_warning_with_prefix(prefix.c_str(), format, ap);
va_end(ap);
}
+void log_file_info(const std::string &filename, int lineno,
+ const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ std::string fmt = stringf("%s:%d: Info: %s",
+ filename.c_str(), lineno, format);
+ logv(fmt.c_str(), ap);
+ va_end(ap);
+}
+
YS_ATTRIBUTE(noreturn)
static void logv_error_with_prefix(const char *prefix,
const char *format, va_list ap)
diff --git a/kernel/log.h b/kernel/log.h
index e6afae716..3e1facae8 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -80,6 +80,7 @@ void log_warning(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
// Log with filename to report a problem in a source file.
void log_file_warning(const std::string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4));
+void log_file_info(const std::string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4));
void log_warning_noprefix(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
YS_NORETURN void log_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);