diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-10 03:06:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-10 03:06:05 -0400 |
| commit | b88151e0e1553607cbebc197e1111ec4bf53a595 (patch) | |
| tree | cd4f57feae521500fe4eb99a98a798241256d341 /lib/libcxx/src/memory.cpp | |
| parent | 3f11d1d56d9747de974b00eab1c880bea7972c01 (diff) | |
| parent | f9bf4889264aee387639bb8a35fdf594236b1283 (diff) | |
| download | zig-b88151e0e1553607cbebc197e1111ec4bf53a595.tar.gz zig-b88151e0e1553607cbebc197e1111ec4bf53a595.zip | |
Merge pull request #12001 from ziglang/llvm14
Upgrade to LLVM 14
Diffstat (limited to 'lib/libcxx/src/memory.cpp')
| -rw-r--r-- | lib/libcxx/src/memory.cpp | 37 |
1 files changed, 8 insertions, 29 deletions
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<const void*>()(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) |
