public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dan Hipschman <dsh@linux.ucla.edu>
To: gcc-patches@gcc.gnu.org
Subject: Re: Remove an RTL usage in the C++ front end
Date: Mon, 06 Aug 2007 22:10:00 -0000	[thread overview]
Message-ID: <20070806221040.GA28201@linux.ucla.edu> (raw)
In-Reply-To: <46B696D0.4030900@codesourcery.com>

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);

      reply	other threads:[~2007-08-06 22:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13  3:43 Dan Hipschman
2007-07-13  3:45 ` Laurynas Biveinis
2007-07-13  5:52   ` Dan Hipschman
2007-08-06  3:34     ` Mark Mitchell
2007-08-06 22:10       ` Dan Hipschman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070806221040.GA28201@linux.ucla.edu \
    --to=dsh@linux.ucla.edu \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).