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/__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/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -666,7 +666,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;