Brendon Costa <[EMAIL PROTECTED]> writes:

> If I have a FUNCTION_DECL node that returns non-null for
> DECL_TEMPLATE_INFO() then it is a template or template instantiation.
> How can I tell if it is a full instantiation (I.e. not general
> template or partial specialisation)?

DECL_TEMPLATE_INSTANTIATION, I believe.

> Does this also apply to nodes that represent template types
> (structs/classes)?

For them I believe you want CLASSTYPE_TEMPLATE_INSTANTIATION.

> Also up to now I have been using my own "tree walker" as I seem to be
> unable to get walk_tree to work as I need. I have come across a few
> problems in my own tree walker and need to change it, but before I do
> I thought I would see if there already exists something that works
> similarly.
> 
> Basically I would like to know the current "tree depth" and context
> for the parent nodes in the tree as it is walked down.
> 
> Is there any way of getting the current depth and node context using
> walk_tree or a similar function?

I don't know of any straightforward way, no.

> One final question. Are there any functions and if so what types that
> are skipped by gimplify_function_tree defined in gimplify.c?

Every function that is going to be expanded into assembly code should
go through gimplify_function_tree.  gcc won't ordinarily bother to
expand static functions which are not used.

Ian

Reply via email to