[lto] Use nth_parm_type in write_function_type.

Kazu Hirata kazu@codesourcery.com
Mon Jun 26 15:02:00 GMT 2006


Hi,

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

Kazu Hirata

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

	* mangle.c (write_function_type): Use nth_parm_type.

Index: cp/mangle.c
===================================================================
--- cp/mangle.c	(revision 114740)
+++ cp/mangle.c	(working copy)
@@ -1831,7 +1831,7 @@ write_function_type (const tree type)
     {
       /* The first parameter must be a POINTER_TYPE pointing to the
 	 `this' parameter.  */
-      tree this_type = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (type)));
+      tree this_type = TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (type), 0));
       write_CV_qualifiers_for_type (this_type);
     }
 



More information about the Gcc-patches mailing list