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] Stop using TREE_CHAIN on TYPE_ARG_TYPES in arg_assoc_args.


Hi,

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

Kazu Hirata

2006-06-24  Kazu Hirata  <kazu@codesourcery.com>

	* name-lookup.c (arg_assoc_args): Use num_parm_types and
	nth_parm_type.

Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c	(revision 114740)
+++ cp/name-lookup.c	(working copy)
@@ -4544,8 +4544,11 @@ arg_assoc_type (struct arg_lookup *k, tr
 static bool
 arg_assoc_args (struct arg_lookup *k, tree args)
 {
-  for (; args; args = TREE_CHAIN (args))
-    if (arg_assoc (k, TREE_VALUE (args)))
+  int len = num_parm_types (args);
+  int i;
+
+  for (i = 0; i < len; i++)
+    if (arg_assoc (k, nth_parm_type (args, i)))
       return true;
   return false;
 }


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