mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 14:26:09 +00:00
[libc++][NFC] clang-format new_handler.cpp
This commit is contained in:
parent
80e4ccab79
commit
aee3a9f5bc
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user