diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-05-09 01:52:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-05-09 01:52:26 -0700 |
| commit | bcb534c295d5cc6fd63caa570cc08e6b148a507c (patch) | |
| tree | 0b17cb1e632d894f50f25e550d5113f232b0e877 /lib/libcxx/src/mutex_destructor.cpp | |
| parent | d9b00ee4ba48717ff6b306a6f9419e7b604ac04b (diff) | |
| parent | 74f52954b9cb40d59d80b839b45bb859146731a7 (diff) | |
| download | zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.tar.gz zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.zip | |
Merge branch 'llvm18'
Upgrades the LLVM, Clang, and LLD dependencies to LLVM 18.x
Related to #16270
Diffstat (limited to 'lib/libcxx/src/mutex_destructor.cpp')
| -rw-r--r-- | lib/libcxx/src/mutex_destructor.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/lib/libcxx/src/mutex_destructor.cpp b/lib/libcxx/src/mutex_destructor.cpp index d366a4e1b3..d5ac257f94 100644 --- a/lib/libcxx/src/mutex_destructor.cpp +++ b/lib/libcxx/src/mutex_destructor.cpp @@ -19,32 +19,24 @@ #include <__config> #include <__threading_support> -#if !defined(_LIBCPP_HAS_NO_THREADS) -# if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION) -# define NEEDS_MUTEX_DESTRUCTOR -# endif +#if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION) +# define NEEDS_MUTEX_DESTRUCTOR #endif _LIBCPP_BEGIN_NAMESPACE_STD #ifdef NEEDS_MUTEX_DESTRUCTOR -class _LIBCPP_EXPORTED_FROM_ABI mutex -{ - __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER; +class _LIBCPP_EXPORTED_FROM_ABI mutex { + __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER; public: - _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY - constexpr mutex() = default; - mutex(const mutex&) = delete; - mutex& operator=(const mutex&) = delete; - ~mutex() noexcept; + _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI constexpr mutex() = default; + mutex(const mutex&) = delete; + mutex& operator=(const mutex&) = delete; + ~mutex() noexcept; }; +mutex::~mutex() noexcept { __libcpp_mutex_destroy(&__m_); } +#endif // !NEEDS_MUTEX_DESTRUCTOR -mutex::~mutex() noexcept -{ - __libcpp_mutex_destroy(&__m_); -} - -#endif // !_LIBCPP_HAS_NO_THREADS _LIBCPP_END_NAMESPACE_STD |
