mutex.cpp
mutex_destructor.cpp
new.cpp
+ new_handler.cpp
optional.cpp
random_shuffle.cpp
ryu/d2fixed.cpp
support/runtime/exception_pointer_glibcxx.ipp
support/runtime/exception_pointer_msvc.ipp
support/runtime/exception_pointer_unimplemented.ipp
- support/runtime/new_handler_fallback.ipp
support/runtime/stdexcept_default.ipp
support/runtime/stdexcept_vcruntime.ipp
system_error.cpp
#include <new>
#include <stdlib.h>
-#include "include/atomic_support.h"
-
-#if defined(_LIBCPP_ABI_MICROSOFT)
-# if !defined(_LIBCPP_ABI_VCRUNTIME)
-# include "support/runtime/new_handler_fallback.ipp"
-# endif
-#elif defined(LIBCXX_BUILDING_LIBCXXABI)
-# include <cxxabi.h>
-#elif defined(LIBCXXRT)
-# include <cxxabi.h>
-# include "support/runtime/new_handler_fallback.ipp"
-#elif defined(__GLIBCXX__)
- // nothing to do
-#else
-# include "support/runtime/new_handler_fallback.ipp"
-#endif
-
namespace std
{
-// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
//===----------------------------------------------------------------------===//
-namespace std {
+#include <new>
+
+#include "include/atomic_support.h"
+
+#if defined(_LIBCPP_ABI_MICROSOFT)
+# if !defined(_LIBCPP_ABI_VCRUNTIME)
+# define _LIBPCPP_DEFINE_NEW_HANDLER
+# endif
+#elif defined(LIBCXX_BUILDING_LIBCXXABI)
+ // nothing to do, we use the one from libc++abi
+#elif defined(LIBCXXRT)
+# define _LIBPCPP_DEFINE_NEW_HANDLER
+#elif defined(__GLIBCXX__)
+ // nothing to do, we use the one from libstdc++/libsupc++
+#else
+# define _LIBPCPP_DEFINE_NEW_HANDLER
+#endif
+
+#if defined(_LIBPCPP_DEFINE_NEW_HANDLER)
+
+namespace std { // purposefully not versioned
static constinit std::new_handler __new_handler = nullptr;
}
} // namespace std
+
+#endif // _LIBPCPP_DEFINE_NEW_HANDLER
libcxx/src/mutex.cpp
libcxx/src/mutex_destructor.cpp
libcxx/src/new.cpp
+libcxx/src/new_handler.cpp
libcxx/src/optional.cpp
libcxx/src/random.cpp
libcxx/src/random_shuffle.cpp
libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
libcxx/src/support/runtime/exception_pointer_msvc.ipp
libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
-libcxx/src/support/runtime/new_handler_fallback.ipp
libcxx/src/support/runtime/stdexcept_default.ipp
libcxx/src/support/runtime/stdexcept_vcruntime.ipp
libcxx/src/support/win32/locale_win32.cpp