summaryrefslogtreecommitdiff
path: root/gcc/tree-mudflap.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 16:44:24 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 16:44:24 +0000
commit8841ff2cab2a78c7e51fbeafc26e73389fae8d41 (patch)
tree79d150c01f035c053db7e2541d526f8e2688fa5d /gcc/tree-mudflap.c
parent995de3775e799c44bd384ce1e05309cc0ab76f1e (diff)
downloadgcc-8841ff2cab2a78c7e51fbeafc26e73389fae8d41.tar.gz
* tree-mudflap.c (deferred_static_decls, mudflap_enqueue_decl,
mudflap_finish_file, mudflap_finish_file): Use VEC instead of VARRAY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99164 138bc75d-0d04-0410-961f-82ee72b054a4
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 b28a427c82b..04282a88320 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. */