[Ada] Set Entity for a created Identifier Node

Message ID 20110804133148.GA8068@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Aug. 4, 2011, 1:31 p.m.
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


Index: cstand.adb
--- cstand.adb	(revision 177353)
+++ cstand.adb	(working copy)
@@ -1651,6 +1651,7 @@ 
       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;