diff options
author | whitequark <whitequark@whitequark.org> | 2020-06-19 01:51:53 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2020-06-19 15:48:58 +0000 |
commit | 21692c4a2e0e70d6e0d09dd0b3c93ff70f1f236e (patch) | |
tree | b919bee0ba9b28285a5bdea33ddcad4a40086c62 /kernel | |
parent | 2ffdb74fb1b12e9f3730d0f152b795838934547d (diff) | |
download | yosys-21692c4a2e0e70d6e0d09dd0b3c93ff70f1f236e.tar.gz yosys-21692c4a2e0e70d6e0d09dd0b3c93ff70f1f236e.tar.bz2 yosys-21692c4a2e0e70d6e0d09dd0b3c93ff70f1f236e.zip |
Use (and ignore) the expression provided to log_debug in NDEBUG builds.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/log.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/log.h b/kernel/log.h index ef4b6b456..9935a9271 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -157,11 +157,10 @@ void log_warning_noprefix(const char *format, ...) YS_ATTRIBUTE(format(printf, 1 #ifndef NDEBUG static inline bool ys_debug(int n = 0) { if (log_force_debug) return true; log_debug_suppressed += n; return false; } -# define log_debug(...) do { if (ys_debug(1)) log(__VA_ARGS__); } while (0) #else static inline bool ys_debug(int = 0) { return false; } -# define log_debug(_fmt, ...) do { } while (0) #endif +# define log_debug(...) do { if (ys_debug(1)) log(__VA_ARGS__); } while (0) static inline void log_suppressed() { if (log_debug_suppressed && !log_make_debug) { |