aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-06-14 14:12:42 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-06-14 14:12:42 +0200
commita5150cb18f6ba057d1c3ab144e12822421fff434 (patch)
treeefaebaa9d5abed6766047e12207fb9ee8d59e67e /gcc/ada/lib-xref.adb
parent3970e5458eb7a3e3c50f7e65d4116abf04d5e5ed (diff)
downloadgcc-a5150cb18f6ba057d1c3ab144e12822421fff434.zip
gcc-a5150cb18f6ba057d1c3ab144e12822421fff434.tar.gz
gcc-a5150cb18f6ba057d1c3ab144e12822421fff434.tar.bz2
[multiple changes]
2016-06-14 Arnaud Charlet <charlet@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Only consider nodes from sources. 2016-06-14 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable simple value propagation in CodePeer mode when warnings are disabled. (Scan_Front_End_Switches): Enable relevant front-end switches when using -gnateC. 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (Is_OK_Volatile_Context): A reference to a volatile object is considered OK if appears as the prefix of attributes Address, Alignment, Component_Size, First_Bit, Last_Bit, Position, Size, Storage_Size. 2016-06-14 Yannick Moy <moy@adacore.com> * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse subunits directly, as they are already traversed as part of the top-level unit to which they belong. (Add_SPARK_Xrefs): Add assertions to ensure correct sorting. (Generate_Dereference): Use unique definition place for special variable __HEAP, to ensure correct sorting of references. * lib-xref.adb (Generate_Reference): Use top-level unit in case of subunits. * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that compute the top-level code unit for a source location of AST node, that go past subunits. From-SVN: r237431
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index ef4acb5..c8c0b85 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1075,11 +1075,11 @@ package body Lib.Xref is
((Ent => Ent,
Loc => Ref,
Typ => Actual_Typ,
- Eun => Get_Code_Unit (Def),
- Lun => Get_Code_Unit (Ref),
+ Eun => Get_Top_Level_Code_Unit (Def),
+ Lun => Get_Top_Level_Code_Unit (Ref),
Ref_Scope => Ref_Scope,
Ent_Scope => Ent_Scope),
- Ent_Scope_File => Get_Code_Unit (Ent));
+ Ent_Scope_File => Get_Top_Level_Code_Unit (Ent));
else
Ref := Original_Location (Sloc (Nod));