From ece71ead6d12da94758b28a3a7ed259d4f3e5030 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 28 Jan 2012 00:32:31 +0000 Subject: Add a little paranoia for testing purposes. llvm-svn: 149157 --- libcxxabi/src/temporary.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libcxxabi/src') 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; } -- cgit v1.2.3