[libc++] Remove <atomic> includes from <stop_token> (#201710)

This commit is contained in:
Nikolas Klauser 2026-06-08 09:48:22 +02:00 committed by GitHub
parent 0db5d27170
commit bb088f7e1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 7 deletions

View file

@ -10,9 +10,10 @@
#ifndef _LIBCPP___STOP_TOKEN_ATOMIC_UNIQUE_LOCK_H
#define _LIBCPP___STOP_TOKEN_ATOMIC_UNIQUE_LOCK_H
#include <__atomic/atomic.h>
#include <__atomic/memory_order.h>
#include <__bit/has_single_bit.h>
#include <__config>
#include <atomic>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View file

@ -10,7 +10,6 @@
#ifndef _LIBCPP___STOP_TOKEN_INTRUSIVE_SHARED_PTR_H
#define _LIBCPP___STOP_TOKEN_INTRUSIVE_SHARED_PTR_H
#include <__atomic/atomic.h>
#include <__atomic/memory_order.h>
#include <__config>
#include <__cstddef/nullptr_t.h>

View file

@ -11,11 +11,12 @@
#define _LIBCPP___STOP_TOKEN_STOP_STATE_H
#include <__assert>
#include <__atomic/atomic.h>
#include <__atomic/memory_order.h>
#include <__config>
#include <__stop_token/atomic_unique_lock.h>
#include <__stop_token/intrusive_list_view.h>
#include <__thread/id.h>
#include <atomic>
#include <cstdint>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

View file

@ -350,8 +350,11 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 20
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 23
# include <atomic>
# endif
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 20
# include <concepts>
# include <cstdint>
# include <cstdlib>

View file

@ -52,6 +52,10 @@ namespace std {
# endif // _LIBCPP_HAS_THREADS
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 23
# include <atomic>
# endif
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 20
# include <cstddef>
# include <iosfwd>

View file

@ -128,6 +128,11 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
# include <system_error>
# include <type_traits>
# endif
# if defined(_LIBCPP_KEEP_TRANSITIVE_INCLUDES_LLVM23) && _LIBCPP_STD_VER <= 23
# include <atomic>
# endif
#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // _LIBCPP_THREAD

View file

@ -180,7 +180,6 @@ complex tuple
complex typeinfo
complex version
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable climits
condition_variable cstdint
@ -876,7 +875,6 @@ stack limits
stack stdexcept
stack tuple
stack version
stop_token atomic
stop_token climits
stop_token cstdint
stop_token cstring
@ -1009,7 +1007,6 @@ system_error string_view
system_error tuple
system_error version
thread array
thread atomic
thread bitset
thread cctype
thread cerrno

1 algorithm cctype
180 complex typeinfo
181 complex version
182 concepts version
condition_variable atomic
183 condition_variable cerrno
184 condition_variable climits
185 condition_variable cstdint
875 stack stdexcept
876 stack tuple
877 stack version
stop_token atomic
878 stop_token climits
879 stop_token cstdint
880 stop_token cstring
1007 system_error tuple
1008 system_error version
1009 thread array
thread atomic
1010 thread bitset
1011 thread cctype
1012 thread cerrno