Commit a1d8cc63 by Eric Botcazou Committed by Eric Botcazou

utils.c (save_gnu_tree): Improve comments.

	* gcc-interface/utils.c (save_gnu_tree): Improve comments.
	(get_gnu_tree): Likewise.

From-SVN: r166485
parent 98cd3025
2010-11-09 Eric Botcazou <ebotcazou@adacore.com> 2010-11-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (save_gnu_tree): Improve comments.
(get_gnu_tree): Likewise.
2010-11-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (finish_fat_pointer_type): New function. * gcc-interface/decl.c (finish_fat_pointer_type): New function.
(gnat_to_gnu_entity) <E_Array_Type>: Use it to build the fat pointer (gnat_to_gnu_entity) <E_Array_Type>: Use it to build the fat pointer
type. type.
......
...@@ -215,17 +215,17 @@ init_gnat_to_gnu (void) ...@@ -215,17 +215,17 @@ init_gnat_to_gnu (void)
associate_gnat_to_gnu = ggc_alloc_cleared_vec_tree (max_gnat_nodes); associate_gnat_to_gnu = ggc_alloc_cleared_vec_tree (max_gnat_nodes);
} }
/* GNAT_ENTITY is a GNAT tree node for an entity. GNU_DECL is the GCC tree /* GNAT_ENTITY is a GNAT tree node for an entity. Associate GNU_DECL, a GCC
which is to be associated with GNAT_ENTITY. Such GCC tree node is always tree node, with GNAT_ENTITY. If GNU_DECL is not a ..._DECL node, abort.
a ..._DECL node. If NO_CHECK is true, the latter check is suppressed. If NO_CHECK is true, the latter check is suppressed.
If GNU_DECL is zero, a previous association is to be reset. */ If GNU_DECL is zero, reset a previous association. */
void void
save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, bool no_check) save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, bool no_check)
{ {
/* Check that GNAT_ENTITY is not already defined and that it is being set /* Check that GNAT_ENTITY is not already defined and that it is being set
to something which is a decl. Raise gigi 401 if not. Usually, this to something which is a decl. If that is not the case, this usually
means GNAT_ENTITY is defined twice, but occasionally is due to some means GNAT_ENTITY is defined twice, but occasionally is due to some
Gigi problem. */ Gigi problem. */
gcc_assert (!(gnu_decl gcc_assert (!(gnu_decl
...@@ -235,9 +235,8 @@ save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, bool no_check) ...@@ -235,9 +235,8 @@ save_gnu_tree (Entity_Id gnat_entity, tree gnu_decl, bool no_check)
SET_GNU_TREE (gnat_entity, gnu_decl); SET_GNU_TREE (gnat_entity, gnu_decl);
} }
/* GNAT_ENTITY is a GNAT tree node for a defining identifier. /* GNAT_ENTITY is a GNAT tree node for an entity. Return the GCC tree node
Return the ..._DECL node that was associated with it. If there is no tree that was associated with it. If there is no such tree node, abort.
node associated with GNAT_ENTITY, abort.
In some cases, such as delayed elaboration or expressions that need to In some cases, such as delayed elaboration or expressions that need to
be elaborated only once, GNAT_ENTITY is really not an entity. */ be elaborated only once, GNAT_ENTITY is really not an entity. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment