This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Remove an RTL usage in the C++ front end
- From: Dan Hipschman <dsh at linux dot ucla dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Aug 2007 15:10:40 -0700
- Subject: Re: Remove an RTL usage in the C++ front end
- References: <20070713032718.GA18363@google.com> <d1e3ff2b0707122036o5b46b29bk9ba4657d697da3cf@mail.gmail.com> <20070713034508.GA2111@google.com> <46B696D0.4030900@codesourcery.com>
- Reply-to: dsh at linux dot ucla dot edu
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);