instead of VARRAY.
* cp-tree.h (local_classes): Likewise.
* mangle.c (discriminator_for_local_entity): Likewise.
* name-lookup.c (pushtag): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99115
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
+
+ * class.c (local_classes, init_class_processing): Use VEC
+ instead of VARRAY.
+ * cp-tree.h (local_classes): Likewise.
+ * mangle.c (discriminator_for_local_entity): Likewise.
+ * name-lookup.c (pushtag): Likewise.
+
2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* semantics.c (finish_call_expr): Call resolve_overloaded_builtin
/* An array of all local classes present in this translation unit, in
declaration order. */
-varray_type local_classes;
+VEC(tree,gc) *local_classes;
static tree get_vfield_name (tree);
static void finish_struct_anon (tree);
current_class_stack_size = 10;
current_class_stack
= xmalloc (current_class_stack_size * sizeof (struct class_stack_node));
- VARRAY_TREE_INIT (local_classes, 8, "local_classes");
+ local_classes = VEC_alloc (tree, gc, 8);
ridpointers[(int) RID_PUBLIC] = access_public_node;
ridpointers[(int) RID_PRIVATE] = access_private_node;
/* An array of all local classes present in this translation unit, in
declaration order. */
-extern GTY(()) varray_type local_classes;
+extern GTY(()) VEC(tree,gc) *local_classes;
\f
/* Here's where we control how name mangling takes place. */
{
/* Scan the list of local classes. */
entity = TREE_TYPE (entity);
- for (type = &VARRAY_TREE (local_classes, 0); *type != entity; ++type)
+ for (type = VEC_address (tree, local_classes); *type != entity; ++type)
if (TYPE_IDENTIFIER (*type) == TYPE_IDENTIFIER (entity)
&& TYPE_CONTEXT (*type) == TYPE_CONTEXT (entity))
++discriminator;
if (TYPE_CONTEXT (type)
&& TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL
&& !processing_template_decl)
- VARRAY_PUSH_TREE (local_classes, type);
+ VEC_safe_push (tree, gc, local_classes, type);
}
if (b->kind == sk_class
&& !COMPLETE_TYPE_P (current_class_type))