aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-23 17:58:46 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-23 17:58:46 +0100
commitc733429f54ace8a10f50c2a751a0c2c940b8c9ce (patch)
tree504fca99a9bcf9ba3be7e0ee603ba133db4c6a5b /gcc/ada/lib-xref.adb
parent7e97e1742acd7bd89f44af38315ec93004b90207 (diff)
downloadgcc-c733429f54ace8a10f50c2a751a0c2c940b8c9ce.zip
gcc-c733429f54ace8a10f50c2a751a0c2c940b8c9ce.tar.gz
gcc-c733429f54ace8a10f50c2a751a0c2c940b8c9ce.tar.bz2
[multiple changes]
2014-01-23 Tristan Gingold <gingold@adacore.com> * gnat_rm.texi: Minor editing. 2014-01-23 Robert Dewar <dewar@adacore.com> * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for with'ed internal units. * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma]. 2014-01-23 Javier Miranda <miranda@adacore.com> * lib-xref.adb (Generate_Reference): As part of processing the "end-of-spec" reference generate an extra reference to the first private entity of the package. * xr_tabls.adb (Add_Reference): No action needed for the extra 'E' reference associated; similar to the processing of the 'e' reference. 2014-01-23 Bob Duff <duff@adacore.com> * gnat_ugn.texi: Change "--&pp off" to "--!pp off". 2014-01-23 Ed Schonberg <schonberg@adacore.com> * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new predicate to implement rule given in 6.1.1 (20/3). * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of 'Old in a postcondition, if it is potentially unevaluated and it is not an entity name. From-SVN: r206990
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index aef33ad..a01bbab 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1069,6 +1069,27 @@ package body Lib.Xref is
Ref_Scope => Empty,
Ent_Scope => Empty),
Ent_Scope_File => No_Unit);
+
+ -- Generate reference to the first private entity
+
+ if Typ = 'e'
+ and then Comes_From_Source (E)
+ and then Nkind (Ent) = N_Defining_Identifier
+ and then (Is_Package_Or_Generic_Package (Ent)
+ or else Is_Concurrent_Type (Ent))
+ and then Present (First_Private_Entity (E))
+ and then In_Extended_Main_Source_Unit (N)
+ then
+ Add_Entry
+ ((Ent => Ent,
+ Loc => Sloc (First_Private_Entity (E)),
+ Typ => 'E',
+ Eun => Get_Source_Unit (Def),
+ Lun => Get_Source_Unit (Ref),
+ Ref_Scope => Empty,
+ Ent_Scope => Empty),
+ Ent_Scope_File => No_Unit);
+ end if;
end if;
end if;
end Generate_Reference;