diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1342,6 +1342,12 @@ #endif #endif // !defined(_LIBCPP_NODEBUG_TYPE) +#if __has_attribute(__standalone_debug__) +#define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__)) +#else +#define _LIBCPP_STANDALONE_DEBUG +#endif + #if __has_attribute(__preferred_name__) #define _LIBCPP_PREFERRED_NAME(x) __attribute__((__preferred_name__(x))) #else diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -89,7 +89,7 @@ }; template -struct __hash_node +struct _LIBCPP_STANDALONE_DEBUG __hash_node : public __hash_node_base < typename __rebind_pointer<_VoidPtr, __hash_node<_Tp, _VoidPtr> >::type diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -714,7 +714,7 @@ }; template -class __tree_node_base +class _LIBCPP_STANDALONE_DEBUG __tree_node_base : public __tree_node_base_types<_VoidPtr>::__end_node_type { typedef __tree_node_base_types<_VoidPtr> _NodeBaseTypes; @@ -742,7 +742,7 @@ }; template -class __tree_node +class _LIBCPP_STANDALONE_DEBUG __tree_node : public __tree_node_base<_VoidPtr> { public: diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -272,7 +272,7 @@ }; template -struct __forward_list_node +struct _LIBCPP_STANDALONE_DEBUG __forward_list_node : public __begin_node_of<_Tp, _VoidPtr>::type { typedef _Tp value_type; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -267,7 +267,7 @@ }; template -struct __list_node +struct _LIBCPP_STANDALONE_DEBUG __list_node : public __list_node_base<_Tp, _VoidPtr> { _Tp __value_; diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -667,7 +667,7 @@ #ifndef _LIBCPP_CXX03_LANG template -struct __value_type +struct _LIBCPP_STANDALONE_DEBUG __value_type { typedef _Key key_type; typedef _Tp mapped_type; diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -702,7 +702,7 @@ #ifndef _LIBCPP_CXX03_LANG template -struct __hash_value_type +struct _LIBCPP_STANDALONE_DEBUG __hash_value_type { typedef _Key key_type; typedef _Tp mapped_type;