commit | 816cb8975d91d436da0dd56b8316c69080cb51b3 | [log] [tgz] |
---|---|---|
author | Howard Hinnant <hhinnant@apple.com> | Sat Dec 04 19:54:11 2010 +0000 |
committer | Howard Hinnant <hhinnant@apple.com> | Sat Dec 04 19:54:11 2010 +0000 |
tree | 248658899495cd8dbdac3d0c0cce61527100b5bb | |
parent | 66a1f86f7a58da781b7b8e43620139cc59a20820 [diff] [blame] |
Fix up uses of new/terminate/unexpected handlers to use the new getters. llvm-svn: 120914
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index a3783d4..e0bb734 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp
@@ -36,8 +36,9 @@ { // If malloc fails and there is a new_handler, // call it to try free up memory. - if (__new_handler) - __new_handler(); + std::new_handler nh = get_new_handler(); + if (nh) + nh(); else #ifndef _LIBCPP_NO_EXCEPTIONS throw std::bad_alloc();