Author: hhinnant
Date: Wed Feb 6 13:29:55 2013
New Revision: 174532
URL: http://llvm.org/viewvc/llvm-project?rev=174532&view=rev
Log:
Partially revert r152770. That commit moved the default handlers to their own
file. But it also did some refactoring. It is the latter that is being
reverted. The refactoring had accidentally removed the required effect that
the default unexpected_handler calls std::terminate(), which is a visible
effect.
Modified:
libcxxabi/trunk/src/cxa_default_handlers.cpp
Modified: libcxxabi/trunk/src/cxa_default_handlers.cpp
URL:
http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_default_handlers.cpp?rev=174532&r1=174531&r2=174532&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_default_handlers.cpp (original)
+++ libcxxabi/trunk/src/cxa_default_handlers.cpp Wed Feb 6 13:29:55 2013
@@ -18,8 +18,10 @@
#include "cxa_exception.hpp"
#include "private_typeinfo.h"
+static const char* cause = "uncaught";
+
__attribute__((noreturn))
-static void default_handler(const char* cause)
+static void default_terminate_handler()
{
// If there might be an uncaught exception
using namespace __cxxabiv1;
@@ -74,17 +76,11 @@ static void default_handler(const char*
abort_message("terminating");
}
-
-__attribute__((noreturn))
-static void default_terminate_handler()
-{
- default_handler("uncaught");
-}
-
__attribute__((noreturn))
static void default_unexpected_handler()
{
- default_handler("unexpected");
+ cause = "unexpected";
+ std::terminate();
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits