diff --git a/libcxx/include/__type_traits/remove_cv.h b/libcxx/include/__type_traits/remove_cv.h --- a/libcxx/include/__type_traits/remove_cv.h +++ b/libcxx/include/__type_traits/remove_cv.h @@ -19,22 +19,31 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC) + +template +using __remove_cv_t = __remove_cv(_Tp); +#else #if __has_builtin(__remove_cv) template -struct remove_cv { +struct __libcpp_remove_cv { using type _LIBCPP_NODEBUG = __remove_cv(_Tp); }; template -using __remove_cv_t = __remove_cv(_Tp); +using __remove_cv_t = typename __libcpp_remove_cv<_Tp>::type; #else -template struct _LIBCPP_TEMPLATE_VIS remove_cv -{typedef __remove_volatile_t<__remove_const_t<_Tp> > type;}; - template using __remove_cv_t = __remove_volatile_t<__remove_const_t<_Tp> >; #endif // __has_builtin(__remove_cv) +#endif // __has_builtin(__remove_cv) + +template +struct remove_cv { + using type _LIBCPP_NODEBUG = __remove_cv_t<_Tp>; +}; + #if _LIBCPP_STD_VER >= 14 template using remove_cv_t = __remove_cv_t<_Tp>; #endif diff --git a/libcxx/include/__type_traits/remove_cvref.h b/libcxx/include/__type_traits/remove_cvref.h --- a/libcxx/include/__type_traits/remove_cvref.h +++ b/libcxx/include/__type_traits/remove_cvref.h @@ -20,12 +20,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__remove_cvref) +#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC) + template using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp); + #else + template -using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; +struct __libcpp_remove_cvref { +#if __has_builtin(__remove_cvref) + using type _LIBCPP_NODEBUG = __remove_cvref(_Tp); +#else + using type _LIBCPP_NODEBUG = __remove_cv_t<__libcpp_remove_reference_t<_Tp> >; +#endif +}; + +template +using __remove_cvref_t _LIBCPP_NODEBUG = typename __libcpp_remove_cvref<_Tp>::type; + #endif // __has_builtin(__remove_cvref) template diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -158,7 +158,7 @@ set_target_properties(unwind_shared PROPERTIES LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}" - LINKER_LANGUAGE C + LINKER_LANGUAGE CXX OUTPUT_NAME "${LIBUNWIND_SHARED_OUTPUT_NAME}" VERSION "1.0" SOVERSION "1"