From 8cace3f05003c6cb4d38c36890055f03151c2ad4 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 16 Oct 2026 02:39:56 +0800 Subject: Remove old code Signed-off-by: Richard Qin --- .../libcxx/include/c++/v1/__new/align_val_t.h | 35 ---------- third_party/libcxx/include/c++/v1/__new/allocate.h | 78 --------------------- .../include/c++/v1/__new/destroying_delete_t.h | 29 -------- .../libcxx/include/c++/v1/__new/exceptions.h | 79 ---------------------- .../include/c++/v1/__new/global_new_delete.h | 70 ------------------- .../include/c++/v1/__new/interference_size.h | 30 -------- third_party/libcxx/include/c++/v1/__new/launder.h | 34 ---------- .../libcxx/include/c++/v1/__new/new_handler.h | 28 -------- .../libcxx/include/c++/v1/__new/nothrow_t.h | 29 -------- .../include/c++/v1/__new/placement_new_delete.h | 34 ---------- 10 files changed, 446 deletions(-) delete mode 100644 third_party/libcxx/include/c++/v1/__new/align_val_t.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/allocate.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/destroying_delete_t.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/exceptions.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/global_new_delete.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/interference_size.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/launder.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/new_handler.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/nothrow_t.h delete mode 100644 third_party/libcxx/include/c++/v1/__new/placement_new_delete.h (limited to 'third_party/libcxx/include/c++/v1/__new') diff --git a/third_party/libcxx/include/c++/v1/__new/align_val_t.h b/third_party/libcxx/include/c++/v1/__new/align_val_t.h deleted file mode 100644 index d8ce528..0000000 --- a/third_party/libcxx/include/c++/v1/__new/align_val_t.h +++ /dev/null @@ -1,35 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_ALIGN_VAL_T_H -#define _LIBCPP___NEW_ALIGN_VAL_T_H - -#include <__config> -#include <__cstddef/size_t.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -// defines its own std::align_val_t type, -// which we use in order to be ABI-compatible with other STLs on Windows. -#if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION && defined(_LIBCPP_ABI_VCRUNTIME) -# include -#endif - -_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -#if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION && !defined(_LIBCPP_ABI_VCRUNTIME) -# ifndef _LIBCPP_CXX03_LANG -enum class align_val_t : size_t {}; -# else -enum align_val_t { __zero = 0, __max = (size_t)-1 }; -# endif -#endif -_LIBCPP_END_UNVERSIONED_NAMESPACE_STD - -#endif // _LIBCPP___NEW_ALIGN_VAL_T_H diff --git a/third_party/libcxx/include/c++/v1/__new/allocate.h b/third_party/libcxx/include/c++/v1/__new/allocate.h deleted file mode 100644 index b9bc2e1..0000000 --- a/third_party/libcxx/include/c++/v1/__new/allocate.h +++ /dev/null @@ -1,78 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_ALLOCATE_H -#define _LIBCPP___NEW_ALLOCATE_H - -#include <__config> -#include <__cstddef/max_align_t.h> -#include <__cstddef/size_t.h> -#include <__new/align_val_t.h> -#include <__type_traits/type_identity.h> -#include <__utility/element_count.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI bool __is_overaligned_for_new(size_t __align) _NOEXCEPT { -#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__ - return __align > __STDCPP_DEFAULT_NEW_ALIGNMENT__; -#else - return __align > _LIBCPP_ALIGNOF(max_align_t); -#endif -} - -template -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _Tp* -__libcpp_allocate(__element_count __n, [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) { - size_t __size = static_cast(__n) * sizeof(_Tp); -#if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return static_cast<_Tp*>(__builtin_operator_new(__size, static_cast(__align))); -#endif - - return static_cast<_Tp*>(__builtin_operator_new(__size)); -} - -#if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L -# define _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(...) __VA_ARGS__ -#else -# define _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(...) /* nothing */ -#endif - -template -inline _LIBCPP_HIDE_FROM_ABI void -__libcpp_deallocate(__type_identity_t<_Tp>* __ptr, - __element_count __n, - [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { - [[__maybe_unused__]] size_t __size = static_cast(__n) * sizeof(_Tp); -#if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return __builtin_operator_delete( - __ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size), static_cast(__align)); -#endif - return __builtin_operator_delete(__ptr _LIBCPP_ONLY_IF_SIZED_DEALLOCATION(, __size)); -} - -#undef _LIBCPP_ONLY_IF_SIZED_DEALLOCATION - -template -inline _LIBCPP_HIDE_FROM_ABI void __libcpp_deallocate_unsized( - __type_identity_t<_Tp>* __ptr, [[__maybe_unused__]] size_t __align = _LIBCPP_ALIGNOF(_Tp)) _NOEXCEPT { -#if _LIBCPP_HAS_ALIGNED_ALLOCATION - if (__is_overaligned_for_new(__align)) - return __builtin_operator_delete(__ptr, static_cast(__align)); -#endif - return __builtin_operator_delete(__ptr); -} -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___NEW_ALLOCATE_H diff --git a/third_party/libcxx/include/c++/v1/__new/destroying_delete_t.h b/third_party/libcxx/include/c++/v1/__new/destroying_delete_t.h deleted file mode 100644 index 1d06d91..0000000 --- a/third_party/libcxx/include/c++/v1/__new/destroying_delete_t.h +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_DESTROYING_DELETE_T_H -#define _LIBCPP___NEW_DESTROYING_DELETE_T_H - -#include <__config> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if _LIBCPP_STD_VER >= 20 -_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -// Enable the declaration even if the compiler doesn't support the language -// feature. -struct destroying_delete_t { - explicit destroying_delete_t() = default; -}; -inline constexpr destroying_delete_t destroying_delete{}; -_LIBCPP_END_UNVERSIONED_NAMESPACE_STD -#endif - -#endif // _LIBCPP___NEW_DESTROYING_DELETE_T_H diff --git a/third_party/libcxx/include/c++/v1/__new/exceptions.h b/third_party/libcxx/include/c++/v1/__new/exceptions.h deleted file mode 100644 index 1aadc23..0000000 --- a/third_party/libcxx/include/c++/v1/__new/exceptions.h +++ /dev/null @@ -1,79 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_EXCEPTIONS_H -#define _LIBCPP___NEW_EXCEPTIONS_H - -#include <__config> -#include <__exception/exception.h> -#include <__verbose_abort> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -// defines its own std::bad_alloc type, -// which we use in order to be ABI-compatible with other STLs on Windows. -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#endif - -_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -#if !defined(_LIBCPP_ABI_VCRUNTIME) - -class _LIBCPP_EXPORTED_FROM_ABI bad_alloc : public exception { -public: - bad_alloc() _NOEXCEPT; - _LIBCPP_HIDE_FROM_ABI bad_alloc(const bad_alloc&) _NOEXCEPT = default; - _LIBCPP_HIDE_FROM_ABI bad_alloc& operator=(const bad_alloc&) _NOEXCEPT = default; - ~bad_alloc() _NOEXCEPT override; - [[__nodiscard__]] const char* what() const _NOEXCEPT override; -}; - -class _LIBCPP_EXPORTED_FROM_ABI bad_array_new_length : public bad_alloc { -public: - bad_array_new_length() _NOEXCEPT; - _LIBCPP_HIDE_FROM_ABI bad_array_new_length(const bad_array_new_length&) _NOEXCEPT = default; - _LIBCPP_HIDE_FROM_ABI bad_array_new_length& operator=(const bad_array_new_length&) _NOEXCEPT = default; - ~bad_array_new_length() _NOEXCEPT override; - [[__nodiscard__]] const char* what() const _NOEXCEPT override; -}; - -#elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0 // !_LIBCPP_ABI_VCRUNTIME - -// When _HAS_EXCEPTIONS == 0, these complete definitions are needed, -// since they would normally be provided in vcruntime_exception.h -class bad_alloc : public exception { -public: - bad_alloc() noexcept : exception("bad allocation") {} - -private: - friend class bad_array_new_length; - - bad_alloc(char const* const __message) noexcept : exception(__message) {} -}; - -class bad_array_new_length : public bad_alloc { -public: - bad_array_new_length() noexcept : bad_alloc("bad array new length") {} -}; - -#endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0 - -[[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void __throw_bad_alloc(); // not in C++ spec - -[[__noreturn__]] inline _LIBCPP_HIDE_FROM_ABI void __throw_bad_array_new_length() { -#if _LIBCPP_HAS_EXCEPTIONS - throw bad_array_new_length(); -#else - _LIBCPP_VERBOSE_ABORT("bad_array_new_length was thrown in -fno-exceptions mode"); -#endif -} -_LIBCPP_END_UNVERSIONED_NAMESPACE_STD - -#endif // _LIBCPP___NEW_EXCEPTIONS_H diff --git a/third_party/libcxx/include/c++/v1/__new/global_new_delete.h b/third_party/libcxx/include/c++/v1/__new/global_new_delete.h deleted file mode 100644 index f31bac3..0000000 --- a/third_party/libcxx/include/c++/v1/__new/global_new_delete.h +++ /dev/null @@ -1,70 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_GLOBAL_NEW_DELETE_H -#define _LIBCPP___NEW_GLOBAL_NEW_DELETE_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__new/align_val_t.h> -#include <__new/nothrow_t.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if defined(_LIBCPP_CXX03_LANG) -# define _THROW_BAD_ALLOC throw(std::bad_alloc) -#else -# define _THROW_BAD_ALLOC -#endif - -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#else -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC; -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT - _LIBCPP_NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; -# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; -# endif - -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC; -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT - _LIBCPP_NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; -# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz) _NOEXCEPT; -# endif - -# if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* -operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; -# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; -# endif - -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* -operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC; -[[__nodiscard__]] _LIBCPP_OVERRIDABLE_FUNC_VIS void* -operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t) _NOEXCEPT; -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT; -# if defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309L -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT; -# endif -# endif -#endif - -#endif // _LIBCPP___NEW_GLOBAL_NEW_DELETE_H diff --git a/third_party/libcxx/include/c++/v1/__new/interference_size.h b/third_party/libcxx/include/c++/v1/__new/interference_size.h deleted file mode 100644 index 591d0ab..0000000 --- a/third_party/libcxx/include/c++/v1/__new/interference_size.h +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_INTERFERENCE_SIZE_H -#define _LIBCPP___NEW_INTERFERENCE_SIZE_H - -#include <__config> -#include <__cstddef/size_t.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD - -#if _LIBCPP_STD_VER >= 17 - -inline constexpr size_t hardware_destructive_interference_size = __GCC_DESTRUCTIVE_SIZE; -inline constexpr size_t hardware_constructive_interference_size = __GCC_CONSTRUCTIVE_SIZE; - -#endif // _LIBCPP_STD_VER >= 17 - -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___NEW_INTERFERENCE_SIZE_H diff --git a/third_party/libcxx/include/c++/v1/__new/launder.h b/third_party/libcxx/include/c++/v1/__new/launder.h deleted file mode 100644 index 886f614..0000000 --- a/third_party/libcxx/include/c++/v1/__new/launder.h +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_LAUNDER_H -#define _LIBCPP___NEW_LAUNDER_H - -#include <__config> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_STD -template -[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT { - // The compiler diagnoses misuses of __builtin_launder, so we don't need to add any static_asserts - // to implement the Mandates. - return __builtin_launder(__p); -} - -#if _LIBCPP_STD_VER >= 17 -template -[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp* launder(_Tp* __p) noexcept { - return __builtin_launder(__p); -} -#endif -_LIBCPP_END_NAMESPACE_STD - -#endif // _LIBCPP___NEW_LAUNDER_H diff --git a/third_party/libcxx/include/c++/v1/__new/new_handler.h b/third_party/libcxx/include/c++/v1/__new/new_handler.h deleted file mode 100644 index 05f4e84..0000000 --- a/third_party/libcxx/include/c++/v1/__new/new_handler.h +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_NEW_HANDLER_H -#define _LIBCPP___NEW_NEW_HANDLER_H - -#include <__config> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#else -_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -typedef void (*new_handler)(); -_LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT; -_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT; -_LIBCPP_END_UNVERSIONED_NAMESPACE_STD -#endif // _LIBCPP_ABI_VCRUNTIME - -#endif // _LIBCPP___NEW_NEW_HANDLER_H diff --git a/third_party/libcxx/include/c++/v1/__new/nothrow_t.h b/third_party/libcxx/include/c++/v1/__new/nothrow_t.h deleted file mode 100644 index a099772..0000000 --- a/third_party/libcxx/include/c++/v1/__new/nothrow_t.h +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_NOTHROW_T_H -#define _LIBCPP___NEW_NOTHROW_T_H - -#include <__config> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#else -_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD -struct nothrow_t { - explicit nothrow_t() = default; -}; -extern _LIBCPP_EXPORTED_FROM_ABI const nothrow_t nothrow; -_LIBCPP_END_UNVERSIONED_NAMESPACE_STD -#endif // _LIBCPP_ABI_VCRUNTIME - -#endif // _LIBCPP___NEW_NOTHROW_T_H diff --git a/third_party/libcxx/include/c++/v1/__new/placement_new_delete.h b/third_party/libcxx/include/c++/v1/__new/placement_new_delete.h deleted file mode 100644 index 74692f3..0000000 --- a/third_party/libcxx/include/c++/v1/__new/placement_new_delete.h +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP___NEW_PLACEMENT_NEW_DELETE_H -#define _LIBCPP___NEW_PLACEMENT_NEW_DELETE_H - -#include <__config> -#include <__cstddef/size_t.h> - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if defined(_LIBCPP_ABI_VCRUNTIME) -# include -#else -[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void* -operator new(std::size_t, void* __p) _NOEXCEPT { - return __p; -} -[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void* -operator new[](std::size_t, void* __p) _NOEXCEPT { - return __p; -} -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void operator delete(void*, void*) _NOEXCEPT {} -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void operator delete[](void*, void*) _NOEXCEPT {} -#endif - -#endif // _LIBCPP___NEW_PLACEMENT_NEW_DELETE_H -- cgit v1.2.3