This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Use nth_parm_type in decl_function_context.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Jul 2006 10:35:20 -0700
- Subject: [lto] Use nth_parm_type in decl_function_context.
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 (decl_function_context): Use nth_parm_type.
Index: tree.c
===================================================================
--- tree.c (revision 115203)
+++ tree.c (working copy)
@@ -5751,7 +5751,7 @@ decl_function_context (tree decl)
else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl))
context
= TYPE_MAIN_VARIANT
- (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))));
+ (TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (TREE_TYPE (decl)), 0)));
else
context = DECL_CONTEXT (decl);