This is the mail archive of the gcc@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: cfun and current_function_decl


On Mon, Jan 18, 2010 at 11:24 AM, Paulo J. Matos <pocmatos@gmail.com> wrote:
> Hi,
>
> As a continuation of my previous issue, what's the difference between
> cfun and current_function_decl and which one should I use to walk the
> tree during TARGET_FUNCTION_OK_FOR_SIBCALL?
>
> [In the internals document I only found references to cfun and even
> there was hard to understand what it actually is]

It's supposed to be that cfun->decl == current_function_decl.  Use
cfun in the middle-end, current_function_decl is used by frontends
as long as there is no struct function allocated for a function.

Richard.


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