summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-01-28 00:32:31 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-01-28 00:32:31 +0000
commitece71ead6d12da94758b28a3a7ed259d4f3e5030 (patch)
treeb7c8ba79e77ac1559d2cd170db14d5c26cdd7053 /libcxxabi/src
parent805036cc835a85a0da5327d9dd71f1c3d6097f40 (diff)
downloadbcm5719-llvm-ece71ead6d12da94758b28a3a7ed259d4f3e5030.tar.gz
bcm5719-llvm-ece71ead6d12da94758b28a3a7ed259d4f3e5030.zip
Add a little paranoia for testing purposes.
llvm-svn: 149157
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/temporary.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/libcxxabi/src/temporary.cpp b/libcxxabi/src/temporary.cpp
index 03701e19c4c..76f6b913397 100644
--- a/libcxxabi/src/temporary.cpp
+++ b/libcxxabi/src/temporary.cpp
@@ -7,14 +7,22 @@
//
//===----------------------------------------------------------------------===//
+#include "abort_message.h"
+
#pragma GCC visibility push(default)
extern "C"
{
-void (*__cxa_new_handler)() = 0;
-void (*__cxa_terminate_handler)() = 0;
-void (*__cxa_unexpected_handler)() = 0;
+static
+void f()
+{
+ abort_message("this shouldn't be called");
+}
+
+void (*__cxa_new_handler)() = f;
+void (*__cxa_terminate_handler)() = f;
+void (*__cxa_unexpected_handler)() = f;
}
OpenPOWER on IntegriCloud