summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorGerolf Hoflehner <ghoflehner@apple.com>2016-05-25 00:54:39 +0000
committerGerolf Hoflehner <ghoflehner@apple.com>2016-05-25 00:54:39 +0000
commit1ac739b2b53aa02892b759c87a7e8f6cb3ee3abd (patch)
tree480b69544a505e8270baf39694fea43dc1b71fe0 /llvm/lib/Support/Unix
parentdebfed9ef0aa349771661a00cc8c472e258d3d93 (diff)
downloadbcm5719-llvm-1ac739b2b53aa02892b759c87a7e8f6cb3ee3abd.tar.gz
bcm5719-llvm-1ac739b2b53aa02892b759c87a7e8f6cb3ee3abd.zip
[Support] Cleanup of an ancient Darwin work-around in Signals.inc (PR26174)
Patch by Jeremy Huddleston Sequoia llvm-svn: 270643
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Signals.inc39
1 files changed, 0 insertions, 39 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 8e0d2057c76..b49b8aae4ff 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -490,42 +490,3 @@ void llvm::sys::PrintStackTraceOnErrorSignal(bool DisableCrashReporting) {
}
#endif
}
-
-
-/***/
-
-// On Darwin, raise sends a signal to the main thread instead of the current
-// thread. This has the unfortunate effect that assert() and abort() will end up
-// bypassing our crash recovery attempts. We work around this for anything in
-// the same linkage unit by just defining our own versions of the assert handler
-// and abort.
-
-#if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)
-
-#include <signal.h>
-#include <pthread.h>
-
-int raise(int sig) {
- return pthread_kill(pthread_self(), sig);
-}
-
-void __assert_rtn(const char *func,
- const char *file,
- int line,
- const char *expr) {
- if (func)
- fprintf(stderr, "Assertion failed: (%s), function %s, file %s, line %d.\n",
- expr, func, file, line);
- else
- fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n",
- expr, file, line);
- abort();
-}
-
-void abort() {
- raise(SIGABRT);
- usleep(1000);
- __builtin_trap();
-}
-
-#endif
OpenPOWER on IntegriCloud