diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -599,7 +599,6 @@ -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override - -Wno-ignored-attributes # FIXME: Caused by _LIBCPP_NODEBUG_TYPE not being supported on older clangs ) if (LIBCXX_TARGETING_CLANG_CL) target_add_compile_flags_if_supported(${target} PRIVATE diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1289,12 +1289,6 @@ #define _LIBCPP_NODEBUG #endif -#if __has_attribute(__nodebug__) && (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 900) -# define _LIBCPP_NODEBUG_TYPE __attribute__((nodebug)) -#else -# define _LIBCPP_NODEBUG_TYPE -#endif - #if __has_attribute(__standalone_debug__) #define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__)) #else diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -127,8 +127,8 @@ __compressed_pair<_Fp, _Ap> __f_; public: - typedef _LIBCPP_NODEBUG_TYPE _Fp _Target; - typedef _LIBCPP_NODEBUG_TYPE _Ap _Alloc; + typedef _LIBCPP_NODEBUG _Fp _Target; + typedef _LIBCPP_NODEBUG _Ap _Alloc; _LIBCPP_INLINE_VISIBILITY const _Target& __target() const { return __f_.first(); } @@ -205,7 +205,7 @@ _Fp __f_; public: - typedef _LIBCPP_NODEBUG_TYPE _Fp _Target; + typedef _LIBCPP_NODEBUG _Fp _Target; _LIBCPP_INLINE_VISIBILITY const _Target& __target() const { return __f_; } diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -836,29 +836,29 @@ #ifndef _LIBCPP_CXX03_LANG template -using __check_hash_requirements _LIBCPP_NODEBUG_TYPE = integral_constant::value && is_move_constructible<_Hash>::value && __invokable_r::value >; template > -using __has_enabled_hash _LIBCPP_NODEBUG_TYPE = integral_constant::value && is_default_constructible<_Hash>::value >; #if _LIBCPP_STD_VER > 14 template -using __enable_hash_helper_imp _LIBCPP_NODEBUG_TYPE = _Type; +using __enable_hash_helper_imp _LIBCPP_NODEBUG = _Type; template -using __enable_hash_helper _LIBCPP_NODEBUG_TYPE = __enable_hash_helper_imp<_Type, +using __enable_hash_helper _LIBCPP_NODEBUG = __enable_hash_helper_imp<_Type, typename enable_if<__all<__has_enabled_hash<_Keys>::value...>::value>::type >; #else template -using __enable_hash_helper _LIBCPP_NODEBUG_TYPE = _Type; +using __enable_hash_helper _LIBCPP_NODEBUG = _Type; #endif #endif // !_LIBCPP_CXX03_LANG diff --git a/libcxx/include/__functional/unwrap_ref.h b/libcxx/include/__functional/unwrap_ref.h --- a/libcxx/include/__functional/unwrap_ref.h +++ b/libcxx/include/__functional/unwrap_ref.h @@ -18,13 +18,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct __unwrap_reference { typedef _LIBCPP_NODEBUG_TYPE _Tp type; }; +struct __unwrap_reference { typedef _LIBCPP_NODEBUG _Tp type; }; template class reference_wrapper; template -struct __unwrap_reference > { typedef _LIBCPP_NODEBUG_TYPE _Tp& type; }; +struct __unwrap_reference > { typedef _LIBCPP_NODEBUG _Tp& type; }; template struct decay; diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h --- a/libcxx/include/__functional/weak_result_type.h +++ b/libcxx/include/__functional/weak_result_type.h @@ -89,7 +89,7 @@ : public __maybe_derive_from_unary_function<_Tp>, public __maybe_derive_from_binary_function<_Tp> { - typedef _LIBCPP_NODEBUG_TYPE typename _Tp::result_type result_type; + typedef _LIBCPP_NODEBUG typename _Tp::result_type result_type; }; template @@ -110,19 +110,19 @@ template struct __weak_result_type<_Rp ()> { - typedef _LIBCPP_NODEBUG_TYPE _Rp result_type; + typedef _LIBCPP_NODEBUG _Rp result_type; }; template struct __weak_result_type<_Rp (&)()> { - typedef _LIBCPP_NODEBUG_TYPE _Rp result_type; + typedef _LIBCPP_NODEBUG _Rp result_type; }; template struct __weak_result_type<_Rp (*)()> { - typedef _LIBCPP_NODEBUG_TYPE _Rp result_type; + typedef _LIBCPP_NODEBUG _Rp result_type; }; // 1 argument case diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -36,7 +36,7 @@ template struct __uses_alloc_ctor_imp { - typedef _LIBCPP_NODEBUG_TYPE typename __uncvref<_Alloc>::type _RawAlloc; + typedef _LIBCPP_NODEBUG typename __uncvref<_Alloc>::type _RawAlloc; static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value; static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -36,11 +36,11 @@ class _RawAlloc = typename remove_reference<_Alloc>::type, bool = __has_pointer<_RawAlloc>::value> struct __pointer { - using type _LIBCPP_NODEBUG_TYPE = typename _RawAlloc::pointer; + using type _LIBCPP_NODEBUG = typename _RawAlloc::pointer; }; template struct __pointer<_Tp, _Alloc, _RawAlloc, false> { - using type _LIBCPP_NODEBUG_TYPE = _Tp*; + using type _LIBCPP_NODEBUG = _Tp*; }; // __const_pointer @@ -48,14 +48,14 @@ template ::value> struct __const_pointer { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::const_pointer; + using type _LIBCPP_NODEBUG = typename _Alloc::const_pointer; }; template struct __const_pointer<_Tp, _Ptr, _Alloc, false> { #ifdef _LIBCPP_CXX03_LANG using type = typename pointer_traits<_Ptr>::template rebind::other; #else - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind; #endif }; @@ -64,14 +64,14 @@ template ::value> struct __void_pointer { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::void_pointer; + using type _LIBCPP_NODEBUG = typename _Alloc::void_pointer; }; template struct __void_pointer<_Ptr, _Alloc, false> { #ifdef _LIBCPP_CXX03_LANG - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind::other; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind::other; #else - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind; #endif }; @@ -80,14 +80,14 @@ template ::value> struct __const_void_pointer { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::const_void_pointer; + using type _LIBCPP_NODEBUG = typename _Alloc::const_void_pointer; }; template struct __const_void_pointer<_Ptr, _Alloc, false> { #ifdef _LIBCPP_CXX03_LANG - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind::other; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind::other; #else - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::template rebind; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind; #endif }; @@ -97,18 +97,18 @@ struct __size_type : make_unsigned<_DiffType> { }; template struct __size_type<_Alloc, _DiffType, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::size_type; + using type _LIBCPP_NODEBUG = typename _Alloc::size_type; }; // __alloc_traits_difference_type _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_difference_type, difference_type); template ::value> struct __alloc_traits_difference_type { - using type _LIBCPP_NODEBUG_TYPE = typename pointer_traits<_Ptr>::difference_type; + using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::difference_type; }; template struct __alloc_traits_difference_type<_Alloc, _Ptr, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::difference_type; + using type _LIBCPP_NODEBUG = typename _Alloc::difference_type; }; // __propagate_on_container_copy_assignment @@ -117,7 +117,7 @@ struct __propagate_on_container_copy_assignment : false_type { }; template struct __propagate_on_container_copy_assignment<_Alloc, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_copy_assignment; + using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_copy_assignment; }; // __propagate_on_container_move_assignment @@ -126,7 +126,7 @@ struct __propagate_on_container_move_assignment : false_type { }; template struct __propagate_on_container_move_assignment<_Alloc, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_move_assignment; + using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_move_assignment; }; // __propagate_on_container_swap @@ -135,7 +135,7 @@ struct __propagate_on_container_swap : false_type { }; template struct __propagate_on_container_swap<_Alloc, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::propagate_on_container_swap; + using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_swap; }; // __is_always_equal @@ -144,7 +144,7 @@ struct __is_always_equal : is_empty<_Alloc> { }; template struct __is_always_equal<_Alloc, true> { - using type _LIBCPP_NODEBUG_TYPE = typename _Alloc::is_always_equal; + using type _LIBCPP_NODEBUG = typename _Alloc::is_always_equal; }; // __allocator_traits_rebind @@ -158,15 +158,15 @@ template ::value> struct __allocator_traits_rebind { - using type _LIBCPP_NODEBUG_TYPE = typename _Tp::template rebind<_Up>::other; + using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other; }; template