diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 16:55:19 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 16:56:03 -0800 |
commit | cd1edebb5034ea52396a5b68304e84ae80878740 (patch) | |
tree | 6a6f8364ea74985d11c4f6ff74e5b80e08dc849d /system/lib/libcxxabi/src/cxa_new_delete.cpp | |
parent | af59788f8b7b76515e36bee1bf66edf497b801db (diff) | |
parent | 2914deb17f3857bb02eeec87a58a3ed6d4a8853a (diff) |
Merge branch 'incoming' of github.com:kripken/emscripten into incoming1.8.8
conflicts: tests/test_core.py tools/shared.py
Diffstat (limited to 'system/lib/libcxxabi/src/cxa_new_delete.cpp')
-rw-r--r-- | system/lib/libcxxabi/src/cxa_new_delete.cpp | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/system/lib/libcxxabi/src/cxa_new_delete.cpp b/system/lib/libcxxabi/src/cxa_new_delete.cpp index 7fd0b3b7..25a5454e 100644 --- a/system/lib/libcxxabi/src/cxa_new_delete.cpp +++ b/system/lib/libcxxabi/src/cxa_new_delete.cpp @@ -9,6 +9,8 @@ // This file implements the new and delete operators. //===----------------------------------------------------------------------===// +#define _LIBCPP_BUILDING_NEW + #include <new> #include <cstdlib> @@ -228,15 +230,33 @@ bad_array_new_length::what() const _NOEXCEPT return "bad_array_new_length"; } -#ifdef __EMSCRIPTEN__ -// We don't build the new.cpp from libcxx, so we need to define this. -void -__throw_bad_alloc() +// bad_array_length + +#ifndef _LIBCPP_BAD_ARRAY_LENGTH_DEFINED + +class _LIBCPP_EXCEPTION_ABI bad_array_length + : public bad_alloc +{ +public: + bad_array_length() _NOEXCEPT; + virtual ~bad_array_length() _NOEXCEPT; + virtual const char* what() const _NOEXCEPT; +}; + +#endif // _LIBCPP_BAD_ARRAY_LENGTH_DEFINED + +bad_array_length::bad_array_length() _NOEXCEPT { -#ifndef _LIBCPP_NO_EXCEPTIONS - throw bad_alloc(); -#endif } -#endif + +bad_array_length::~bad_array_length() _NOEXCEPT +{ +} + +const char* +bad_array_length::what() const _NOEXCEPT +{ + return "bad_array_length"; +} } // std |