diff --git a/libcxx/include/__atomic/aliases.h b/libcxx/include/__atomic/aliases.h --- a/libcxx/include/__atomic/aliases.h +++ b/libcxx/include/__atomic/aliases.h @@ -25,90 +25,89 @@ _LIBCPP_BEGIN_NAMESPACE_STD -using atomic_bool = atomic; -using atomic_char = atomic; -using atomic_schar = atomic; -using atomic_uchar = atomic; -using atomic_short = atomic; -using atomic_ushort = atomic; -using atomic_int = atomic; -using atomic_uint = atomic; -using atomic_long = atomic; -using atomic_ulong = atomic; -using atomic_llong = atomic; -using atomic_ullong = atomic; +typedef atomic atomic_bool; +typedef atomic atomic_char; +typedef atomic atomic_schar; +typedef atomic atomic_uchar; +typedef atomic atomic_short; +typedef atomic atomic_ushort; +typedef atomic atomic_int; +typedef atomic atomic_uint; +typedef atomic atomic_long; +typedef atomic atomic_ulong; +typedef atomic atomic_llong; +typedef atomic atomic_ullong; #ifndef _LIBCPP_HAS_NO_CHAR8_T -using atomic_char8_t = atomic; +typedef atomic atomic_char8_t; #endif -using atomic_char16_t = atomic; -using atomic_char32_t = atomic; +typedef atomic atomic_char16_t; +typedef atomic atomic_char32_t; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -using atomic_wchar_t = atomic; +typedef atomic atomic_wchar_t; #endif -using atomic_int_least8_t = atomic; -using atomic_uint_least8_t = atomic; -using atomic_int_least16_t = atomic; -using atomic_uint_least16_t = atomic; -using atomic_int_least32_t = atomic; -using atomic_uint_least32_t = atomic; -using atomic_int_least64_t = atomic; -using atomic_uint_least64_t = atomic; +typedef atomic atomic_int_least8_t; +typedef atomic atomic_uint_least8_t; +typedef atomic atomic_int_least16_t; +typedef atomic atomic_uint_least16_t; +typedef atomic atomic_int_least32_t; +typedef atomic atomic_uint_least32_t; +typedef atomic atomic_int_least64_t; +typedef atomic atomic_uint_least64_t; -using atomic_int_fast8_t = atomic; -using atomic_uint_fast8_t = atomic; -using atomic_int_fast16_t = atomic; -using atomic_uint_fast16_t = atomic; -using atomic_int_fast32_t = atomic; -using atomic_uint_fast32_t = atomic; -using atomic_int_fast64_t = atomic; -using atomic_uint_fast64_t = atomic; +typedef atomic atomic_int_fast8_t; +typedef atomic atomic_uint_fast8_t; +typedef atomic atomic_int_fast16_t; +typedef atomic atomic_uint_fast16_t; +typedef atomic atomic_int_fast32_t; +typedef atomic atomic_uint_fast32_t; +typedef atomic atomic_int_fast64_t; +typedef atomic atomic_uint_fast64_t; -using atomic_int8_t = atomic< int8_t>; -using atomic_uint8_t = atomic; -using atomic_int16_t = atomic< int16_t>; -using atomic_uint16_t = atomic; -using atomic_int32_t = atomic< int32_t>; -using atomic_uint32_t = atomic; -using atomic_int64_t = atomic< int64_t>; -using atomic_uint64_t = atomic; +typedef atomic< int8_t> atomic_int8_t; +typedef atomic atomic_uint8_t; +typedef atomic< int16_t> atomic_int16_t; +typedef atomic atomic_uint16_t; +typedef atomic< int32_t> atomic_int32_t; +typedef atomic atomic_uint32_t; +typedef atomic< int64_t> atomic_int64_t; +typedef atomic atomic_uint64_t; -using atomic_intptr_t = atomic; -using atomic_uintptr_t = atomic; -using atomic_size_t = atomic; -using atomic_ptrdiff_t = atomic; -using atomic_intmax_t = atomic; -using atomic_uintmax_t = atomic; +typedef atomic atomic_intptr_t; +typedef atomic atomic_uintptr_t; +typedef atomic atomic_size_t; +typedef atomic atomic_ptrdiff_t; +typedef atomic atomic_intmax_t; +typedef atomic atomic_uintmax_t; // atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type #ifdef __cpp_lib_atomic_is_always_lock_free -# define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value +# define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value #else -# define _LIBCPP_CONTENTION_LOCK_FREE false +# define _LIBCPP_CONTENTION_LOCK_FREE false #endif #if ATOMIC_LLONG_LOCK_FREE == 2 -using __libcpp_signed_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>; -using __libcpp_unsigned_lock_free = - __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long> __libcpp_unsigned_lock_free; #elif ATOMIC_INT_LOCK_FREE == 2 -using __libcpp_signed_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int>; -using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int> __libcpp_unsigned_lock_free; #elif ATOMIC_SHORT_LOCK_FREE == 2 -using __libcpp_signed_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short>; -using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short> __libcpp_unsigned_lock_free; #elif ATOMIC_CHAR_LOCK_FREE == 2 -using __libcpp_signed_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char>; -using __libcpp_unsigned_lock_free = __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char> __libcpp_signed_lock_free; +typedef __conditional_t<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char> __libcpp_unsigned_lock_free; #else -// No signed/unsigned lock-free types -# define _LIBCPP_NO_LOCK_FREE_TYPES + // No signed/unsigned lock-free types +#define _LIBCPP_NO_LOCK_FREE_TYPES #endif #if !defined(_LIBCPP_NO_LOCK_FREE_TYPES) -using atomic_signed_lock_free = atomic<__libcpp_signed_lock_free>; -using atomic_unsigned_lock_free = atomic<__libcpp_unsigned_lock_free>; +typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free; +typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free; #endif _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h --- a/libcxx/include/__atomic/atomic.h +++ b/libcxx/include/__atomic/atomic.h @@ -29,9 +29,9 @@ struct atomic : public __atomic_base<_Tp> { - using __base = __atomic_base<_Tp>; - using value_type = _Tp; - using difference_type = value_type; + typedef __atomic_base<_Tp> __base; + typedef _Tp value_type; + typedef value_type difference_type; #if _LIBCPP_STD_VER >= 20 _LIBCPP_HIDE_FROM_ABI @@ -61,9 +61,9 @@ struct atomic<_Tp*> : public __atomic_base<_Tp*> { - using __base = __atomic_base<_Tp*>; - using value_type = _Tp*; - using difference_type = ptrdiff_t; + typedef __atomic_base<_Tp*> __base; + typedef _Tp* value_type; + typedef ptrdiff_t difference_type; _LIBCPP_HIDE_FROM_ABI atomic() _NOEXCEPT = default; diff --git a/libcxx/include/__atomic/atomic_base.h b/libcxx/include/__atomic/atomic_base.h --- a/libcxx/include/__atomic/atomic_base.h +++ b/libcxx/include/__atomic/atomic_base.h @@ -143,7 +143,7 @@ struct __atomic_base<_Tp, true> : public __atomic_base<_Tp, false> { - using __base = __atomic_base<_Tp, false>; + typedef __atomic_base<_Tp, false> __base; _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __atomic_base() _NOEXCEPT = default; diff --git a/libcxx/include/__atomic/atomic_flag.h b/libcxx/include/__atomic/atomic_flag.h --- a/libcxx/include/__atomic/atomic_flag.h +++ b/libcxx/include/__atomic/atomic_flag.h @@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -struct atomic_flag +typedef struct atomic_flag { __cxx_atomic_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_; @@ -82,7 +82,8 @@ atomic_flag& operator=(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) volatile = delete; -}; +} atomic_flag; + inline _LIBCPP_HIDE_FROM_ABI bool diff --git a/libcxx/include/__atomic/memory_order.h b/libcxx/include/__atomic/memory_order.h --- a/libcxx/include/__atomic/memory_order.h +++ b/libcxx/include/__atomic/memory_order.h @@ -31,7 +31,7 @@ __mo_seq_cst }; -using __memory_order_underlying_t = underlying_type<__legacy_memory_order>::type; +typedef underlying_type<__legacy_memory_order>::type __memory_order_underlying_t; #if _LIBCPP_STD_VER >= 20 @@ -56,14 +56,14 @@ #else -enum memory_order { +typedef enum memory_order { memory_order_relaxed = __mo_relaxed, memory_order_consume = __mo_consume, memory_order_acquire = __mo_acquire, memory_order_release = __mo_release, memory_order_acq_rel = __mo_acq_rel, memory_order_seq_cst = __mo_seq_cst, -}; +} memory_order; #endif // _LIBCPP_STD_VER >= 20 diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt --- a/libcxx/utils/data/ignore_format.txt +++ b/libcxx/utils/data/ignore_format.txt @@ -213,6 +213,7 @@ libcxx/include/any libcxx/include/array libcxx/include/atomic +libcxx/include/__atomic/aliases.h libcxx/include/__atomic/atomic_base.h libcxx/include/__atomic/atomic_flag.h libcxx/include/__atomic/atomic.h