Patchwork [Ada] Set Entity for a created Identifier Node

login
register
mail settings
Submitter Arnaud Charlet
Date Aug. 4, 2011, 1:31 p.m.
Message ID <20110804133148.GA8068@adacore.com>
Download mbox | patch
Permalink /patch/108461/
State New
Headers show

Comments

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

Patch

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;