3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-12 20:51:27 +00:00

Move log_abort()'s call to log_error() into an out-of-line non-varargs function

This commit is contained in:
Robert O'Callahan 2025-08-23 18:30:07 +12:00 committed by Jannis Harder
parent 419eeb2a8f
commit b6459a3d8b
2 changed files with 8 additions and 1 deletions

View file

@ -263,7 +263,9 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi
# define log_assert(_assert_expr_) do { if (0) { (void)(_assert_expr_); } } while(0)
#endif
#define log_abort() YOSYS_NAMESPACE_PREFIX log_error("Abort in %s:%d.\n", __FILE__, __LINE__)
[[noreturn]]
void log_abort_internal(const char *file, int line);
#define log_abort() YOSYS_NAMESPACE_PREFIX log_abort_internal(__FILE__, __LINE__)
#define log_ping() YOSYS_NAMESPACE_PREFIX log("-- %s:%d %s --\n", __FILE__, __LINE__, __PRETTY_FUNCTION__)