diff --git a/libcxx/include/__config b/libcxx/include/__config index 49255a850f796c..30a4f4a9527d76 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1342,6 +1342,12 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container( #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 index 08abe3920c689e..ed354405dc2786 100644 --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -89,7 +89,7 @@ struct __hash_node_base }; 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 index 439992ee21fe82..70f3a276773a2e 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -714,7 +714,7 @@ public: }; 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 @@ private: }; 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 index ef0f70ab795c91..39ffac31a555a6 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -272,7 +272,7 @@ struct _LIBCPP_HIDDEN __begin_node_of }; 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 index b4cc649c473386..b1c9746e72fa7f 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -267,7 +267,7 @@ struct __list_node_base }; 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 index 065d1d17aa455b..4512dbd5aed647 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -667,7 +667,7 @@ template class __map_const_iterator; #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 index 8b0bea3b5c1c45..a93a6525c66ec8 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -702,7 +702,7 @@ public: #ifndef _LIBCPP_CXX03_LANG template -struct __hash_value_type +struct _LIBCPP_STANDALONE_DEBUG __hash_value_type { typedef _Key key_type; typedef _Tp mapped_type;