+2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
+
+ * function.h (types_used_by_cur_var_decl): Change type to a VEC.
+ * function.c (types_used_by_cur_var_decl): Likewise.
+ (used_types_insert): Adjust for new type of
+ types_used_by_cur_var_decl.
+
2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
* tree.h (record_layout_info): Change type of pending_statics field
+2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
+
+ * c-common.c (record_types_used_by_current_var_decl): Adjust for
+ new type of types_used_by_cur_var_decl.
+
2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
PR bootstrap/44512
{
gcc_assert (decl && DECL_P (decl) && TREE_STATIC (decl));
- if (types_used_by_cur_var_decl)
+ while (!VEC_empty (tree, types_used_by_cur_var_decl))
{
- tree node;
- for (node = types_used_by_cur_var_decl;
- node;
- node = TREE_CHAIN (node))
- {
- tree type = TREE_PURPOSE (node);
- types_used_by_var_decl_insert (type, decl);
- }
- types_used_by_cur_var_decl = NULL;
+ tree type = VEC_pop (tree, types_used_by_cur_var_decl);
+ types_used_by_var_decl_insert (type, decl);
}
}
\f
htab_t types_used_by_vars_hash = NULL;
-tree types_used_by_cur_var_decl = NULL;
+VEC(tree,gc) *types_used_by_cur_var_decl;
/* Forward declarations. */
/* So this might be a type referenced by a global variable.
Record that type so that we can later decide to emit its debug
information. */
- types_used_by_cur_var_decl =
- tree_cons (t, NULL, types_used_by_cur_var_decl);
-
+ VEC_safe_push (tree, gc, types_used_by_cur_var_decl, t);
}
}
int types_used_by_vars_eq (const void *, const void *);
void types_used_by_var_decl_insert (tree type, tree var_decl);
-/* During parsing of a global variable, this linked list points to
- the list of types referenced by the global variable. */
-extern GTY(()) tree types_used_by_cur_var_decl;
+/* During parsing of a global variable, this vector contains the types
+ referenced by the global variable. */
+extern GTY(()) VEC(tree,gc) *types_used_by_cur_var_decl;
/* cfun shouldn't be set directly; use one of these functions instead. */