From bd680139d084b673d1f56d0e63e01936c4680a91 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 1 Jul 2022 16:31:47 -0700 Subject: update libcxx to llvm 14.0.6 --- lib/libcxx/src/memory.cpp | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'lib/libcxx/src/memory.cpp') diff --git a/lib/libcxx/src/memory.cpp b/lib/libcxx/src/memory.cpp index 9bd27df268..4c9bf9f073 100644 --- a/lib/libcxx/src/memory.cpp +++ b/lib/libcxx/src/memory.cpp @@ -1,4 +1,4 @@ -//===------------------------ memory.cpp ----------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -8,11 +8,11 @@ #include "memory" #ifndef _LIBCPP_HAS_NO_THREADS -#include "mutex" -#include "thread" -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif +# include "mutex" +# include "thread" +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif #include "include/atomic_support.h" @@ -130,7 +130,7 @@ __shared_weak_count::__get_deleter(const type_info&) const noexcept return nullptr; } -#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) +#if !defined(_LIBCPP_HAS_NO_THREADS) _LIBCPP_SAFE_STATIC static const std::size_t __sp_mut_count = 16; _LIBCPP_SAFE_STATIC static __libcpp_mutex_t mut_back[__sp_mut_count] = @@ -181,28 +181,7 @@ __get_sp_mut(const void* p) return muts[hash()(p) & (__sp_mut_count-1)]; } -#endif // !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) - -void -declare_reachable(void*) -{ -} - -void -declare_no_pointers(char*, size_t) -{ -} - -void -undeclare_no_pointers(char*, size_t) -{ -} - -void* -__undeclare_reachable(void* p) -{ - return p; -} +#endif // !defined(_LIBCPP_HAS_NO_THREADS) void* align(size_t alignment, size_t size, void*& ptr, size_t& space) -- cgit v1.2.3