summaryrefslogtreecommitdiffstats
path: root/libcxx/include/new
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-10 07:43:08 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-10 07:43:08 +0000
commit8dcdeaeb35500dd309cf2ff315dd829501798027 (patch)
tree71a024602be7d4b685780ed3c3f8e3fdda26b6bb /libcxx/include/new
parent6677999e174b862eb17da64449bd04fba644e28f (diff)
downloadbcm5719-llvm-8dcdeaeb35500dd309cf2ff315dd829501798027.tar.gz
bcm5719-llvm-8dcdeaeb35500dd309cf2ff315dd829501798027.zip
Revert "Split exception.cpp and new.cpp implementation into different files for different runtimes."
The compiler-rt CMake configuration needs some tweaking before this can land. llvm-svn: 294727
Diffstat (limited to 'libcxx/include/new')
-rw-r--r--libcxx/include/new24
1 files changed, 6 insertions, 18 deletions
diff --git a/libcxx/include/new b/libcxx/include/new
index 7a2a498b0ed..86428f281dc 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -92,10 +92,6 @@ void operator delete[](void* ptr, void*) noexcept;
#include <cstdlib>
#endif
-#if defined(_LIBCPP_ABI_MICROSOFT)
-#include <new.h>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -114,10 +110,6 @@ void operator delete[](void* ptr, void*) noexcept;
namespace std // purposefully not using versioning namespace
{
-#if !defined(_LIBCPP_ABI_MICROSOFT)
-struct _LIBCPP_TYPE_VIS nothrow_t {};
-extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
-
class _LIBCPP_EXCEPTION_ABI bad_alloc
: public exception
{
@@ -136,12 +128,6 @@ public:
virtual const char* what() const _NOEXCEPT;
};
-typedef void (*new_handler)();
-_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
-
-#endif // !_LIBCPP_ABI_MICROSOFT
-
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
#if defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11)
@@ -167,6 +153,12 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 };
#endif
#endif
+struct _LIBCPP_TYPE_VIS nothrow_t {};
+extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
+typedef void (*new_handler)();
+_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
+_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
+
} // std
#if defined(_LIBCPP_CXX03_LANG)
@@ -175,8 +167,6 @@ enum align_val_t { __zero = 0, __max = (size_t)-1 };
#define _THROW_BAD_ALLOC
#endif
-#if !defined(_LIBCPP_ABI_MICROSOFT)
-
_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
_LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT;
@@ -216,8 +206,6 @@ inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _N
inline _LIBCPP_INLINE_VISIBILITY void operator delete (void*, void*) _NOEXCEPT {}
inline _LIBCPP_INLINE_VISIBILITY void operator delete[](void*, void*) _NOEXCEPT {}
-#endif // !_LIBCPP_ABI_MICROSOFT
-
_LIBCPP_BEGIN_NAMESPACE_STD
inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) {
OpenPOWER on IntegriCloud