mirror of https://github.com/YosysHQ/yosys.git
Use C++11 [[noreturn]] attribute.
This commit is contained in:
parent
7191dd16f9
commit
60478a8e3a
|
@ -319,7 +319,7 @@ void log_file_info(const std::string &filename, int lineno,
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
YS_ATTRIBUTE(noreturn)
|
||||
[[noreturn]]
|
||||
static void logv_error_with_prefix(const char *prefix,
|
||||
const char *format, va_list ap)
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ void logv(const char *format, va_list ap);
|
|||
void logv_header(RTLIL::Design *design, const char *format, va_list ap);
|
||||
void logv_warning(const char *format, va_list ap);
|
||||
void logv_warning_noprefix(const char *format, va_list ap);
|
||||
YS_NORETURN void logv_error(const char *format, va_list ap) YS_ATTRIBUTE(noreturn);
|
||||
[[noreturn]] void logv_error(const char *format, va_list ap);
|
||||
|
||||
void log(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
||||
void log_header(RTLIL::Design *design, const char *format, ...) YS_ATTRIBUTE(format(printf, 2, 3));
|
||||
|
@ -151,9 +151,9 @@ void log_file_warning(const std::string &filename, int lineno, const char *forma
|
|||
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);
|
||||
void log_file_error(const string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4), noreturn);
|
||||
YS_NORETURN void log_cmd_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);
|
||||
[[noreturn]] void log_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
||||
void log_file_error(const string &filename, int lineno, const char *format, ...) YS_ATTRIBUTE(format(printf, 3, 4));
|
||||
[[noreturn]] void log_cmd_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
|
||||
|
||||
#ifndef NDEBUG
|
||||
static inline bool ys_debug(int n = 0) { if (log_force_debug) return true; log_debug_suppressed += n; return false; }
|
||||
|
|
|
@ -138,13 +138,10 @@ extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *p
|
|||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define YS_ATTRIBUTE(...) __attribute__((__VA_ARGS__))
|
||||
# define YS_NORETURN
|
||||
#elif defined(_MSC_VER)
|
||||
# define YS_ATTRIBUTE(...)
|
||||
# define YS_NORETURN __declspec(noreturn)
|
||||
#else
|
||||
# define YS_ATTRIBUTE(...)
|
||||
# define YS_NORETURN
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
|
Loading…
Reference in New Issue