[Ada] Set Entity for a created Identifier Node

Arnaud Charlet charlet@adacore.com
Thu Aug 4 13:32:00 GMT 2011


The function Identifer_For, called from the code that generates the type
declarations for string types in the standard package, now also sets the
entity of the generated identifier.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-04  Johannes Kanig  <kanig@adacore.com>

	* cstand.adb: Add Information to Identifier in Standard
	(Identifer_For): Set Entity to the corresponding entity

-------------- next part --------------
Index: cstand.adb
===================================================================
--- cstand.adb	(revision 177353)
+++ cstand.adb	(working copy)
@@ -1651,6 +1651,7 @@
    begin
       Ident_Node := New_Node (N_Identifier, Stloc);
       Set_Chars (Ident_Node, Chars (Standard_Entity (S)));
+      Set_Entity (Ident_Node, Standard_Entity (S));
       return Ident_Node;
    end Identifier_For;
 


More information about the Gcc-patches mailing list