This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Use num_parm_types and nth_parm_type in stdarg_p.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Jul 2006 10:38:57 -0700
- Subject: [lto] Use num_parm_types and nth_parm_type in stdarg_p.
Hi,
Tested on x86_64-pc-linux-gnu. Committed to the LTO branch as
obvious.
Kazu Hirata
2006-07-11 Kazu Hirata <kazu@codesourcery.com>
* tree.c (stdarg_p): Use num_parm_types and nth_parm_type.
Index: tree.c
===================================================================
--- tree.c (revision 115307)
+++ tree.c (working copy)
@@ -7598,9 +7598,10 @@ empty_body_p (tree stmt)
bool
stdarg_p (tree fntype)
{
- return (TYPE_ARG_TYPES (fntype) != 0
- && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
- != void_type_node));
+ tree parm_types = TYPE_ARG_TYPES (fntype);
+ int len = num_parm_types (parm_types);
+ return (len
+ && nth_parm_type (parm_types, len - 1) != void_type_node);
}
/* Initialize the abstract argument list iterator object ITER with the argument