aboutsummaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorEddie Hung <eddie.hung+gitlab@gmail.com>2018-07-23 14:14:18 +0000
committerEddie Hung <eddie.hung+gitlab@gmail.com>2018-07-23 14:14:18 +0000
commit14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9 (patch)
tree79af7f375362eeae2a0d9ee96c1bc6f09ab8fcce /common/log.h
parentdfdeb21690181044a95c2b2d64c197c999507b0c (diff)
parente647604e2a584917ad2fc9acfe838a1395c613c2 (diff)
downloadnextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.tar.gz
nextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.tar.bz2
nextpnr-14c33cd197b420da1ef9a5a2ed5c19e4490ba7c9.zip
Merge branch 'master' into 'master'
Master See merge request eddiehung/nextpnr!7
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/common/log.h b/common/log.h
index c3607e39..35450311 100644
--- a/common/log.h
+++ b/common/log.h
@@ -69,17 +69,13 @@ NPNR_NORETURN void log_cmd_error(const char *format, ...) NPNR_ATTRIBUTE(format(
void log_break();
void log_flush();
-#ifndef NDEBUG
static inline void log_assert_worker(bool cond, const char *expr, const char *file, int line)
{
if (!cond)
log_error("Assert `%s' failed in %s:%d.\n", expr, file, line);
}
#define log_assert(_assert_expr_) \
- YOSYS_NAMESPACE_PREFIX log_assert_worker(_assert_expr_, #_assert_expr_, __FILE__, __LINE__)
-#else
-#define log_assert(_assert_expr_)
-#endif
+ NEXTPNR_NAMESPACE_PREFIX log_assert_worker(_assert_expr_, #_assert_expr_, __FILE__, __LINE__)
#define log_abort() log_error("Abort in %s:%d.\n", __FILE__, __LINE__)
#define log_ping() log("-- %s:%d %s --\n", __FILE__, __LINE__, __PRETTY_FUNCTION__)