diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-06 11:23:17 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-06 11:23:17 +0100 |
commit | 4446a13faa6ac84d2ef391bfb330370ec78053ca (patch) | |
tree | 3955586656957f515e4adc2d438b580f8a827213 /gcc/ada/lib-xref.adb | |
parent | e09a559856ab95618cdbc9704b06145cc6c34ca1 (diff) | |
download | gcc-4446a13faa6ac84d2ef391bfb330370ec78053ca.zip gcc-4446a13faa6ac84d2ef391bfb330370ec78053ca.tar.gz gcc-4446a13faa6ac84d2ef391bfb330370ec78053ca.tar.bz2 |
[multiple changes]
2014-02-06 Robert Dewar <dewar@adacore.com>
* casing.adb (Determine_Casing): Consider SPARK_Mode to be
mixed case.
2014-02-06 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
when the function has a foreign convention, but not if only the
limited return type has such a convention.
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
variable Spec. Comment reformatting. Use Copy_Separate_Tree
rather than New_Copy_Tree when building the corresponding
subprogram declaration.
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Global_Item): Remove
the mode-related checks on abstract states with enabled external
properties.
(Property_Error): Removed.
2014-02-06 Javier Miranda <miranda@adacore.com>
* lib-xref.adb (Generate_Reference): When
generating the reference to the first private entity take care
of handling swapped entities.
From-SVN: r207547
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r-- | gcc/ada/lib-xref.adb | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 034e67a..fbbdc3f 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -1088,15 +1088,29 @@ package body Lib.Xref is 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); + -- Handle case in which the full-view and partial-view of the + -- first private entity are swapped + + declare + First_Private : Entity_Id := First_Private_Entity (E); + + begin + if Is_Private_Type (First_Private) + and then Present (Full_View (First_Private)) + then + First_Private := Full_View (First_Private); + end if; + + Add_Entry + ((Ent => Ent, + Loc => Sloc (First_Private), + Typ => 'E', + Eun => Get_Source_Unit (Def), + Lun => Get_Source_Unit (Ref), + Ref_Scope => Empty, + Ent_Scope => Empty), + Ent_Scope_File => No_Unit); + end; end if; end if; end if; |