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 | 686f0d17a6a420ab5577a3c6597d0abb0b1d2a01 (patch) | |
tree | 474b6de4dcb8b7baa41d727f28adca6dcd26a570 | |
parent | 22e490d908bf60c2265ede78ff518eb7dde3b761 (diff) | |
download | bcm5719-llvm-686f0d17a6a420ab5577a3c6597d0abb0b1d2a01.tar.gz bcm5719-llvm-686f0d17a6a420ab5577a3c6597d0abb0b1d2a01.zip |
On Apple platforms, wire up compilerrt_abort() to log file and function info
llvm-svn: 149723
-rw-r--r-- | compiler-rt/lib/int_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/lib/int_util.c b/compiler-rt/lib/int_util.c index f19476864b1..871d191658c 100644 --- a/compiler-rt/lib/int_util.c +++ b/compiler-rt/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() */ |