This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] cp/call.c: Use compparms in build_op_delete_call.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Jun 2006 23:33:58 -0700
- Subject: [lto] cp/call.c: Use compparms in build_op_delete_call.
Hi,
Attached is a patch to use compparms in build_op_delete_call.
The lines removed by this patch does exactly what compparms does.
This patch replaces those lines with compparms while reducing use of
TREE_CHAIN on parameter type lists.
Tested on x86_64-pc-linux-gnu. OK to apply to the LTO branch (and 4.3
once in Stage 1)?
Kazu Hirata
2006-06-15 Kazu Hirata <kazu@codesourcery.com>
* cp/call.c (build_op_delete_call): Use compparms.
Index: cp/call.c
===================================================================
--- cp/call.c (revision 114647)
+++ cp/call.c (working copy)
@@ -4043,15 +4043,7 @@ build_op_delete_call (enum tree_code cod
/* On the first pass, check the rest of the arguments. */
if (pass == 0)
{
- tree a = argtypes;
- while (a && t)
- {
- if (!same_type_p (TREE_VALUE (a), TREE_VALUE (t)))
- break;
- a = TREE_CHAIN (a);
- t = TREE_CHAIN (t);
- }
- if (!a && !t)
+ if (compparms (argtypes, t))
break;
}
/* On the second pass, the second argument must be