aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-09-22 18:12:10 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-09-22 18:12:10 +0000
commit942149531d595c7860a49a9688fd9cd160a62455 (patch)
tree3d48eaf3d5b695c2aed8d381f2851caa06e286d3 /gcc/cp/rtti.c
parent8739ed59c414cb398d6ffd6df489519700116d8a (diff)
downloadgcc-942149531d595c7860a49a9688fd9cd160a62455.zip
gcc-942149531d595c7860a49a9688fd9cd160a62455.tar.gz
gcc-942149531d595c7860a49a9688fd9cd160a62455.tar.bz2
cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
* cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree). * decl2.c (cp_finish_file): Adjust tinfo decl emission loop. * rtti.c (unemitted_tinfo_decls): Make a VEC(tree). (init_rtti_processing): Initialize it to something realistic. (get_tinfo_decl): Adjust pushing the new decl. From-SVN: r87872
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 2dc05ad..b995726 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -73,8 +73,8 @@ Boston, MA 02111-1307, USA. */
/* The IDENTIFIER_NODE naming the real class. */
#define TINFO_REAL_NAME(NODE) TREE_PURPOSE (NODE)
-/* A varray of all tinfo decls that haven't yet been emitted. */
-varray_type unemitted_tinfo_decls;
+/* A vector of all tinfo decls that haven't yet been emitted. */
+VEC (tree) *unemitted_tinfo_decls;
static tree build_headof (tree);
static tree ifnonnull (tree, tree);
@@ -120,8 +120,8 @@ init_rtti_processing (void)
type_info_ptr_type = build_pointer_type (const_type_info_type);
type_info_ref_type = build_reference_type (const_type_info_type);
- VARRAY_TREE_INIT (unemitted_tinfo_decls, 10, "RTTI decls");
-
+ unemitted_tinfo_decls = VEC_alloc (tree, 124);
+
create_tinfo_types ();
}
@@ -361,8 +361,7 @@ get_tinfo_decl (tree type)
pushdecl_top_level_and_finish (d, NULL_TREE);
/* Add decl to the global array of tinfo decls. */
- gcc_assert (unemitted_tinfo_decls != 0);
- VARRAY_PUSH_TREE (unemitted_tinfo_decls, d);
+ VEC_safe_push (tree, unemitted_tinfo_decls, d);
}
return d;