diff --git a/libcxx/include/__config b/libcxx/include/__config index fe01b58b8e627..ace6e1cd73e3e 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1170,11 +1170,7 @@ typedef __char32_t char32_t; # define _LIBCPP_NOESCAPE # endif -# if __has_attribute(__nodebug__) -# define _LIBCPP_NODEBUG __attribute__((__nodebug__)) -# else -# define _LIBCPP_NODEBUG -# endif +# define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]] # if __has_attribute(__standalone_debug__) # define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__)) diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index 06d3225a6e22d..a421a3ef4f5f9 100644 --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -146,8 +146,8 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)> { _LIBCPP_COMPRESSED_PAIR(_Fp, __func_, _Ap, __alloc_); public: - typedef _LIBCPP_NODEBUG _Fp _Target; - typedef _LIBCPP_NODEBUG _Ap _Alloc; + using _Target _LIBCPP_NODEBUG = _Fp; + using _Alloc _LIBCPP_NODEBUG = _Ap; _LIBCPP_HIDE_FROM_ABI const _Target& __target() const { return __func_; } @@ -198,7 +198,7 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> { _Fp __f_; public: - typedef _LIBCPP_NODEBUG _Fp _Target; + using _Target _LIBCPP_NODEBUG = _Fp; _LIBCPP_HIDE_FROM_ABI const _Target& __target() const { return __f_; } diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h index dc4398bb02d34..72a0a9c399bd4 100644 --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -39,10 +39,10 @@ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template struct __uses_alloc_ctor_imp { - typedef _LIBCPP_NODEBUG __remove_cvref_t<_Alloc> _RawAlloc; - static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value; - static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; - static const int value = __ua ? 2 - __ic : 0; + using _RawAlloc _LIBCPP_NODEBUG = __remove_cvref_t<_Alloc>; + static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value; + static const bool __ic = is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value; + static const int value = __ua ? 2 - __ic : 0; }; template diff --git a/libcxx/include/__memory/allocator_destructor.h b/libcxx/include/__memory/allocator_destructor.h index ed3d8918f5fe3..aac92a23fa0d4 100644 --- a/libcxx/include/__memory/allocator_destructor.h +++ b/libcxx/include/__memory/allocator_destructor.h @@ -20,11 +20,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD template class __allocator_destructor { - typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits; + using __alloc_traits _LIBCPP_NODEBUG = allocator_traits<_Alloc>; public: - typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer; - typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type; + using pointer _LIBCPP_NODEBUG = typename __alloc_traits::pointer; + using size_type _LIBCPP_NODEBUG = typename __alloc_traits::size_type; private: _Alloc& __alloc_; diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h index 4acf3d18401ae..e35cfb7c3b878 100644 --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -50,17 +50,17 @@ struct __pointer_traits_element_type {}; template struct __pointer_traits_element_type<_Ptr, true> { - typedef _LIBCPP_NODEBUG typename _Ptr::element_type type; + using type _LIBCPP_NODEBUG = typename _Ptr::element_type; }; template