mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-11 20:21:26 +00:00
Move log_abort()'s call to log_error() into an out-of-line non-varargs function
This commit is contained in:
parent
1b5373de0d
commit
c3924d0616
2 changed files with 8 additions and 1 deletions
|
@ -415,6 +415,11 @@ void log_assert_failure(const char *expr, const char *file, int line)
|
|||
log_error("Assert `%s' failed in %s:%d.\n", expr, file, line);
|
||||
}
|
||||
|
||||
void log_abort_internal(const char *file, int line)
|
||||
{
|
||||
log_error("Abort in %s:%d.\n", file, line);
|
||||
}
|
||||
|
||||
void log_cmd_error(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue