diff options
author | Nick Kledzik <kledzik@apple.com> | 2010-05-18 22:17:13 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2010-05-18 22:17:13 +0000 |
commit | 62713dac1948a41e3c81b845ae51a176ff692635 (patch) | |
tree | 687ed119fc9d50d3d045ad862a4731cb08f1acac /libcxx/src | |
parent | f8bf66387319197689e140c1c7ec652e36056167 (diff) | |
download | bcm5719-llvm-62713dac1948a41e3c81b845ae51a176ff692635.tar.gz bcm5719-llvm-62713dac1948a41e3c81b845ae51a176ff692635.zip |
Add set_new_handler and nothrow implementations
llvm-svn: 104073
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/new.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp index bc105cc4859..9ad0612824b 100644 --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -118,6 +118,16 @@ operator delete[] (void* ptr, const std::nothrow_t&) throw () namespace std { +const nothrow_t nothrow = {}; + +new_handler +set_new_handler(new_handler handler) throw() +{ + new_handler r = __new_handler; + __new_handler = handler; + return r; +} + bad_alloc::bad_alloc() throw() { } |