This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
source location of a tree node
- From: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 9 Oct 2006 16:34:18 +0200
- Subject: source location of a tree node
Dear All
(sorry for such a naive question, I am a beginner within GCC)
How does one get the source location (e.g. start and end filename,
linenumber, ...) of a tree node; for example, the source position of every
loop inside current_loops or of every function body inside cgraph_nodes?
for these nodes, doing EXPR_FILENAME(node->decl), EXPR_LINENO(node->decl)
does not work, probably because node->decl is a declaration, but also
EXPR_FILENAME(DECL_SAVED_TREE(node->decl)),
EXPR_LINENO(DECL_SAVED_TREE(node->decl))) don't work neither...
I do understand that some of the tree (Gimple/ssa) nodes do not have any
positions with them. What is the policy on this? When transforming trees, do
we have to provide the location in the source code of the transformed tree.
Apologies for such a naive question, but I tried to find out for one hour
without success!
Thanks for reading
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France