[libc++][NFC] clang-format new_handler.cpp

This commit is contained in:
Louis Dionne 2023-06-14 13:44:46 -07:00
parent 80e4ccab79
commit aee3a9f5bc
2 changed files with 9 additions and 18 deletions

View File

@ -11,17 +11,17 @@
#include "include/atomic_support.h"
#if defined(_LIBCPP_ABI_MICROSOFT)
# if !defined(_LIBCPP_ABI_VCRUNTIME)
# define _LIBPCPP_DEFINE_NEW_HANDLER
# endif
# 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
// nothing to do, we use the one from libc++abi
#elif defined(LIBCXXRT)
# define _LIBPCPP_DEFINE_NEW_HANDLER
# define _LIBPCPP_DEFINE_NEW_HANDLER
#elif defined(__GLIBCXX__)
// nothing to do, we use the one from libstdc++/libsupc++
// nothing to do, we use the one from libstdc++/libsupc++
#else
# define _LIBPCPP_DEFINE_NEW_HANDLER
# define _LIBPCPP_DEFINE_NEW_HANDLER
#endif
#if defined(_LIBPCPP_DEFINE_NEW_HANDLER)
@ -30,17 +30,9 @@ namespace std { // purposefully not versioned
static constinit std::new_handler __new_handler = nullptr;
new_handler
set_new_handler(new_handler handler) noexcept
{
return __libcpp_atomic_exchange(&__new_handler, handler);
}
new_handler set_new_handler(new_handler handler) noexcept { return __libcpp_atomic_exchange(&__new_handler, handler); }
new_handler
get_new_handler() noexcept
{
return __libcpp_atomic_load(&__new_handler);
}
new_handler get_new_handler() noexcept { return __libcpp_atomic_load(&__new_handler); }
} // namespace std

View File

@ -809,7 +809,6 @@ libcxx/src/memory.cpp
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