This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] Use vec_heap2parm_types in grokparms.


Hi,

Tested on x86_64-pc-linux-gnu.  Committed to the lTO branch as
obvious.

Kazu Hirata

2006-08-11  Kazu Hirata  <kazu@codesourcery.com>

	* decl.c (grokparms): Use vec_heap2parm_types.

Index: cp/decl.c
===================================================================
--- cp/decl.c	(revision 116078)
+++ cp/decl.c	(working copy)
@@ -8743,6 +8743,7 @@ grokparms (cp_parameter_declarator *firs
   int ellipsis = !first_parm || first_parm->ellipsis_p;
   cp_parameter_declarator *parm;
   int any_error = 0;
+  VEC(tree,heap) *v = NULL;
 
   for (parm = first_parm; parm != NULL; parm = parm->next)
     {
@@ -8825,12 +8826,13 @@ grokparms (cp_parameter_declarator *firs
       TREE_CHAIN (decl) = decls;
       decls = decl;
       DECL_INITIAL (decl) = init;
-      result = tree_cons (NULL_TREE, type, result);
+      VEC_safe_push (tree, heap, v, type);
     }
   decls = nreverse (decls);
-  result = nreverse (result);
   if (!ellipsis)
-    result = chainon (result, void_list_node);
+    VEC_safe_push (tree, heap, v, void_type_node);
+  result = vec_heap2parm_types (v);
+  VEC_free (tree, heap, v);
   *parms = decls;
 
   return result;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]