Apply [[standalone_debug]] to some types in the STL.
Add this attribute to some types to ensure that they have
debug info.
The debug info for these classes are required for debuggers to display
some STL types. With constructor homing (a new debug info optimization)
their debug info isn't emitted because their constructors are never
called.
The list of types with the attribute added are __hash_value_type,
__value_type, __tree_node_base, __tree_node, __hash_node, __list_node,
and __forward_list_node.
Differential Revision: https://reviews.llvm.org/D98750
NOKEYCHECK=True
GitOrigin-RevId: 7c2f58278e664d336e9d0ef0687bdd6c3837dc03
diff --git a/include/__tree b/include/__tree
index 439992e..70f3a27 100644
--- a/include/__tree
+++ b/include/__tree
@@ -714,7 +714,7 @@
};
template <class _VoidPtr>
-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 _Tp, class _VoidPtr>
-class __tree_node
+class _LIBCPP_STANDALONE_DEBUG __tree_node
: public __tree_node_base<_VoidPtr>
{
public: