summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Unix/Signals.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Signals.inc b/llvm/lib/System/Unix/Signals.inc
index 7b7c43efc78..dcbda4e008d 100644
--- a/llvm/lib/System/Unix/Signals.inc
+++ b/llvm/lib/System/Unix/Signals.inc
@@ -274,6 +274,10 @@ void llvm::sys::PrintStackTraceOnErrorSignal() {
#ifdef __APPLE__
+int raise(int sig) {
+ return pthread_kill(pthread_self(), SIGABRT);
+}
+
void __assert_rtn(const char *func,
const char *file,
int line,
@@ -291,7 +295,7 @@ void __assert_rtn(const char *func,
#include <pthread.h>
void abort() {
- pthread_kill(pthread_self(), SIGABRT);
+ raise(SIGABRT);
usleep(1000);
__builtin_trap();
}
OpenPOWER on IntegriCloud