diff options
author | Nick Kledzik <kledzik@apple.com> | 2012-02-03 23:53:40 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2012-02-03 23:53:40 +0000 |
commit | c453bd5ba0faad8344cb94d627a6683a9ad14ca7 (patch) | |
tree | 1c0b117d90834b6b9107e7bf729971862a257753 | |
parent | 1f4f7b5c2796c5e950457563e6221351791958e6 (diff) | |
download | compiler-rt-c453bd5ba0faad8344cb94d627a6683a9ad14ca7.tar.gz compiler-rt-c453bd5ba0faad8344cb94d627a6683a9ad14ca7.tar.bz2 compiler-rt-c453bd5ba0faad8344cb94d627a6683a9ad14ca7.tar.xz |
On Apple platforms, wire up compilerrt_abort() to log file and function info
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149723 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/int_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/int_util.c b/lib/int_util.c index f1947686..871d1916 100644 --- a/lib/int_util.c +++ b/lib/int_util.c @@ -29,6 +29,19 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) { panic("%s:%d: abort in %s", file, line, function); } +#elif __APPLE__ && !__STATIC__ + +/* from libSystem.dylib */ +extern void __assert_rtn(const char *func, const char *file, + int line, const char * message) __attribute__((noreturn)); + +__attribute__((weak)) +__attribute__((visibility("hidden"))) +void compilerrt_abort_impl(const char *file, int line, const char *function) { + __assert_rtn(function, file, line, "libcompiler_rt abort"); +} + + #else /* Get the system definition of abort() */ |