/* Output Go language descriptions of types.
- Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Ian Lance Taylor <iant@google.com>.
This file is part of GCC.
/* A queue of decls to output. */
-static GTY(()) VEC(tree,gc) *queue;
+static GTY(()) vec<tree, va_gc> *queue;
/* A hash table of macros we have seen. */
|| DECL_IS_BUILTIN (decl)
|| DECL_NAME (decl) == NULL_TREE)
return;
- VEC_safe_push (tree, gc, queue, decl);
+ vec_safe_push (queue, decl);
}
/* A function decl. */
|| TREE_CODE (TYPE_NAME (TREE_TYPE (decl))) != IDENTIFIER_NODE)
&& TREE_CODE (TREE_TYPE (decl)) != ENUMERAL_TYPE)
return;
- VEC_safe_push (tree, gc, queue, decl);
+ vec_safe_push (queue, decl);
}
/* A container for the data we pass around when generating information
keyword_hash_init (&container);
- FOR_EACH_VEC_ELT (tree, queue, ix, decl)
+ FOR_EACH_VEC_SAFE_ELT (queue, ix, decl)
{
switch (TREE_CODE (decl))
{
htab_delete (container.keyword_hash);
obstack_free (&container.type_obstack, NULL);
- queue = NULL;
+ vec_free (queue);
if (fclose (go_dump_file) != 0)
error ("could not close Go dump file: %m");