Compare commits

..

1 Commits

Author SHA1 Message Date
Howard Hinnant
3403461ccd Tagging 10
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/tags/libcpp-10@120811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-03 17:25:36 +00:00
2 changed files with 4 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ std::get_unexpected() throw()
void
std::unexpected()
{
(*std::get_unexpected())();
(*__unexpected_handler)();
// unexpected handler should not return
std::terminate();
}
@@ -62,7 +62,7 @@ std::terminate()
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
(*std::get_terminate())();
(*__terminate_handler)();
// handler should not return
::abort ();
#ifndef _LIBCPP_NO_EXCEPTIONS

View File

@@ -36,9 +36,8 @@ operator new(std::size_t size) throw (std::bad_alloc)
{
// If malloc fails and there is a new_handler,
// call it to try free up memory.
std::new_handler nh = std::get_new_handler();
if (nh)
nh();
if (__new_handler)
__new_handler();
else
#ifndef _LIBCPP_NO_EXCEPTIONS
throw std::bad_alloc();