aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/src/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcxx/src/memory.cpp')
-rw-r--r--lib/libcxx/src/memory.cpp37
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)