This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Names for structs from RECORD_TYPE trees
David Morse <dm@bomberlan.net> writes:
> Can anyone think of a way to fetch the name of a struct from its tree
> node? Given a node for a structure, with TREE_CODE (t) == RECORD_TYPE, I
> find that DECL_NAME (TYPE_NAME (t)) returns NULL_TREE.
Does debug_tree on it from gdb show a name?
If so, try IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t))).
>
> That's what the documentation says it will do.
>
> Unfortunately I need that name...
--
"You can't have everything. Where would you put it?
"-Steven Wright