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]

Re: Remove an RTL usage in the C++ front end


On Sun, Aug 05, 2007 at 08:34:40PM -0700, Mark Mitchell wrote:
> Dan Hipschman wrote:
> > Index: cp/method.c
> > ===================================================================
> > --- cp/method.c (revision 126593)
> > +++ cp/method.c (working copy)
> > @@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
> >        current_function_decl = thunk_fndecl;
> >        DECL_RESULT (thunk_fndecl)
> >         = build_decl (RESULT_DECL, 0, integer_type_node);
> > -      fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
> > +      fnname = get_name (thunk_fndecl);
> 
> Why use get_name here?  I'd actually prefer that we use name
> IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl)); we don't want the
> recursive ADDR_EXPR behavior in get_name, do we?
> 
> OK with that change.

Thanks.  Committed:


cp/
2007-08-06  Dan Hipschman  <dsh@google.com>

	* method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
	access function name.

Index: gcc/cp/method.c
===================================================================
--- gcc/cp/method.c	(revision 127254)
+++ gcc/cp/method.c	(working copy)
@@ -430,7 +430,7 @@ use_thunk (tree thunk_fndecl, bool emit_
       current_function_decl = thunk_fndecl;
       DECL_RESULT (thunk_fndecl)
 	= build_decl (RESULT_DECL, 0, integer_type_node);
-      fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
+      fnname = IDENTIFIER_POINTER (DECL_NAME (thunk_fndecl));
       /* The back end expects DECL_INITIAL to contain a BLOCK, so we
 	 create one.  */
       fn_block = make_node (BLOCK);


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