X-Git-Url: https://git.saurik.com/apple/objc4.git/blobdiff_plain/bd8dfcfccd2b822ca2e14037cae5c0eb96e8f30d..refs/heads/master:/runtime/objc-errors.mm?ds=inline diff --git a/runtime/objc-errors.mm b/runtime/objc-errors.mm index 6d65ca2..17fdda2 100644 --- a/runtime/objc-errors.mm +++ b/runtime/objc-errors.mm @@ -76,8 +76,6 @@ void _objc_error(id rcv, const char *fmt, va_list args) #include <_simple.h> -OBJC_EXPORT void (*_error)(id, const char *, va_list); - // Return true if c is a UTF8 continuation byte static bool isUTF8Continuation(char c) { @@ -160,7 +158,7 @@ static void _objc_syslog(const char *message) #if !__OBJC2__ // used by ExceptionHandling.framework #endif -__attribute__((noreturn)) +__attribute__((noreturn, cold)) void _objc_error(id self, const char *fmt, va_list ap) { char *buf; @@ -183,7 +181,7 @@ void __objc_error(id rcv, const char *fmt, ...) va_end(vp); } -static __attribute__((noreturn)) +static __attribute__((noreturn, cold)) void _objc_fatalv(uint64_t reason, uint64_t flags, const char *fmt, va_list ap) { char *buf1; @@ -200,6 +198,7 @@ void _objc_fatalv(uint64_t reason, uint64_t flags, const char *fmt, va_list ap) _Exit(1); } else { + _objc_crashlog(buf1); abort_with_reason(OS_REASON_OBJC, reason, buf1, flags); } }