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


Dan Hipschman wrote:

> 2007-06-12  Dan Hipschman  <dsh@google.com>
> 
>         * cp/method.c (use_thunk): Use get_name instead of DECL_RTL to
>         access function name.
> 
> 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.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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