This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Reverse mapping from decl uid
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: "Uday P. Khedker" <uday at cse dot iitb dot ac dot in>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 19 Sep 2010 12:20:51 +0200
- Subject: Re: Reverse mapping from decl uid
- References: <4C951257.5010901@cse.iitb.ac.in>
On Sat, Sep 18, 2010 at 9:26 PM, Uday P. Khedker <uday@cse.iitb.ac.in> wrote:
>
> Given a tree node, we can get its uid by using DECL_UID(node).
>
> Given a uid, is it possible to directly get the tree node that
> corresponds to it? I can of course make a list of nodes that I
> am interested in but if there is an API, I would much rather
> use it.
Not in general, there is referenced_var which is such a mapping
but is only valid for the decls a function references.
Richard.
> Thanks.
>
> Uday.
>
> P.S. : Earlier, I have written pretty complex code because I
> ? ? ? didn't know some of the APIs :-(
>
> ? ? ? Trying to become wiser now :-)
>