aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-mudflap.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-05-03 16:44:24 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-05-03 16:44:24 +0000
commit64fe5271963de7f68994ce99bda3a380f20b5dbe (patch)
tree79d150c01f035c053db7e2541d526f8e2688fa5d /gcc/tree-mudflap.c
parent88c710ec5e0bda2dfa89de40018fefcaa5a8e551 (diff)
downloadgcc-64fe5271963de7f68994ce99bda3a380f20b5dbe.zip
gcc-64fe5271963de7f68994ce99bda3a380f20b5dbe.tar.gz
gcc-64fe5271963de7f68994ce99bda3a380f20b5dbe.tar.bz2
tree-mudflap.c (deferred_static_decls, [...]): Use VEC instead of VARRAY.
* tree-mudflap.c (deferred_static_decls, mudflap_enqueue_decl, mudflap_finish_file, mudflap_finish_file): Use VEC instead of VARRAY. From-SVN: r99164
Diffstat (limited to 'gcc/tree-mudflap.c')
-rw-r--r--gcc/tree-mudflap.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index b28a427..04282a8 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -1148,7 +1148,7 @@ mf_marked_p (tree t)
delayed until program finish time. If they're still incomplete by
then, warnings are emitted. */
-static GTY (()) varray_type deferred_static_decls;
+static GTY (()) VEC(tree,gc) *deferred_static_decls;
/* A list of statements for calling __mf_register() at startup time. */
static GTY (()) tree enqueued_call_stmt_chain;
@@ -1189,10 +1189,7 @@ mudflap_enqueue_decl (tree obj)
if (DECL_P (obj) && DECL_EXTERNAL (obj) && DECL_ARTIFICIAL (obj))
return;
- if (! deferred_static_decls)
- VARRAY_TREE_INIT (deferred_static_decls, 10, "deferred static list");
-
- VARRAY_PUSH_TREE (deferred_static_decls, obj);
+ VEC_safe_push (tree, gc, deferred_static_decls, obj);
}
@@ -1243,10 +1240,9 @@ mudflap_finish_file (void)
if (deferred_static_decls)
{
size_t i;
- for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_static_decls); i++)
+ tree obj;
+ for (i = 0; VEC_iterate (tree, deferred_static_decls, i, obj); i++)
{
- tree obj = VARRAY_TREE (deferred_static_decls, i);
-
gcc_assert (DECL_P (obj));
if (mf_marked_p (obj))
@@ -1271,7 +1267,7 @@ mudflap_finish_file (void)
mf_varname_tree (obj));
}
- VARRAY_CLEAR (deferred_static_decls);
+ VEC_truncate (tree, deferred_static_decls, 0);
}
/* Append all the enqueued registration calls. */