]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-iterator.c
This patch rewrites the old VEC macro-based interface into a new one
[thirdparty/gcc.git] / gcc / tree-iterator.c
index e4175fd46eca9ee3e1f7969296c535d97a559922..7de885a10cd9357da4face433b53f9fe3fbaeef6 100644 (file)
@@ -31,15 +31,15 @@ along with GCC; see the file COPYING3.  If not see
 /* This is a cache of STATEMENT_LIST nodes.  We create and destroy them
    fairly often during gimplification.  */
 
-static GTY ((deletable (""))) VEC(tree,gc) *stmt_list_cache;
+static GTY ((deletable (""))) vec<tree, va_gc> *stmt_list_cache;
 
 tree
 alloc_stmt_list (void)
 {
   tree list;
-  if (!VEC_empty (tree, stmt_list_cache))
+  if (!vec_safe_is_empty (stmt_list_cache))
     {
-      list = VEC_pop (tree, stmt_list_cache);
+      list = stmt_list_cache->pop ();
       memset (list, 0, sizeof(struct tree_base));
       TREE_SET_CODE (list, STATEMENT_LIST);
     }
@@ -54,7 +54,7 @@ free_stmt_list (tree t)
 {
   gcc_assert (!STATEMENT_LIST_HEAD (t));
   gcc_assert (!STATEMENT_LIST_TAIL (t));
-  VEC_safe_push (tree, gc, stmt_list_cache, t);
+  vec_safe_push (stmt_list_cache, t);
 }
 
 /* A subroutine of append_to_statement_list{,_force}.  T is not NULL.  */