[llvm-commits] [compiler-rt] r149723 - /compiler-rt/trunk/lib/int_util.c

Nick Kledzik kledzik at apple.com
Fri Feb 3 15:53:41 PST 2012


Author: kledzik
Date: Fri Feb  3 17:53:40 2012
New Revision: 149723

URL: http://llvm.org/viewvc/llvm-project?rev=149723&view=rev
Log:
On Apple platforms, wire up compilerrt_abort() to log file and function info

Modified:
    compiler-rt/trunk/lib/int_util.c

Modified: compiler-rt/trunk/lib/int_util.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_util.c?rev=149723&r1=149722&r2=149723&view=diff
==============================================================================
--- compiler-rt/trunk/lib/int_util.c (original)
+++ compiler-rt/trunk/lib/int_util.c Fri Feb  3 17:53:40 2012
@@ -29,6 +29,19 @@
   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() */





More information about the llvm-commits mailing list