From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30630 invoked by alias); 6 Aug 2007 22:10:46 -0000 Received: (qmail 30344 invoked by uid 22791); 6 Aug 2007 22:10:44 -0000 X-Spam-Check-By: sourceware.org Received: from fire2.LINUX.UCLA.EDU (HELO linux.ucla.edu) (131.179.104.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 22:10:42 +0000 Received: from dsh by linux.ucla.edu with local (Exim 3.36 #1 (Debian)) id 1IIAme-00010K-00 for ; Mon, 06 Aug 2007 15:10:40 -0700 Date: Mon, 06 Aug 2007 22:10:00 -0000 From: Dan Hipschman To: gcc-patches@gcc.gnu.org Subject: Re: Remove an RTL usage in the C++ front end Message-ID: <20070806221040.GA28201@linux.ucla.edu> Reply-To: dsh@linux.ucla.edu Mail-Followup-To: gcc-patches@gcc.gnu.org References: <20070713032718.GA18363@google.com> <20070713034508.GA2111@google.com> <46B696D0.4030900@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <46B696D0.4030900@codesourcery.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00398.txt.bz2 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 * 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);