[cfe-commits] [libcxxabi] r149157 - /libcxxabi/trunk/src/temporary.cpp

Howard Hinnant hhinnant at apple.com
Fri Jan 27 16:32:32 PST 2012


Author: hhinnant
Date: Fri Jan 27 18:32:31 2012
New Revision: 149157

URL: http://llvm.org/viewvc/llvm-project?rev=149157&view=rev
Log:
Add a little paranoia for testing purposes.

Modified:
    libcxxabi/trunk/src/temporary.cpp

Modified: libcxxabi/trunk/src/temporary.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/temporary.cpp?rev=149157&r1=149156&r2=149157&view=diff
==============================================================================
--- libcxxabi/trunk/src/temporary.cpp (original)
+++ libcxxabi/trunk/src/temporary.cpp Fri Jan 27 18:32:31 2012
@@ -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;
 
 }
 





More information about the cfe-commits mailing list