aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 12:07:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-06 12:07:16 +0200
commita4f4dbdb5aed55635b7977300ed7a860c5cd606a (patch)
tree2d0b490839b9a77f1f7a6e4af7c974573e86ffce /gcc/ada/lib-xref.adb
parent3e69995410d3462cca8846369620b2e438996138 (diff)
downloadgcc-a4f4dbdb5aed55635b7977300ed7a860c5cd606a.zip
gcc-a4f4dbdb5aed55635b7977300ed7a860c5cd606a.tar.gz
gcc-a4f4dbdb5aed55635b7977300ed7a860c5cd606a.tar.bz2
[multiple changes]
2017-09-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb: Minor reformatting. 2017-09-06 Justin Squirek <squirek@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image attribute cases (Rewrite_Object_Reference_Image): Created to aid the rewriting of new-style 'Image attributes. * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases (Check_Object_Reference_Image): Created to handle verification of 'Image with object-references as prefixes. * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object): Create predicate to identify cases where an 'Image attribute's prefix applies to an object reference. From-SVN: r251767
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index d40f0d4..c2958ea 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -415,6 +415,7 @@ package body Lib.Xref is
function Get_Through_Renamings (E : Entity_Id) return Entity_Id is
begin
case Ekind (E) is
+
-- For subprograms we just need to check once if they are have a
-- Renamed_Entity, because Renamed_Entity is set transitively.
@@ -443,6 +444,7 @@ package body Lib.Xref is
declare
Renamed : constant Entity_Id := Renamed_Object (Obj);
+
begin
if Present (Renamed) then
Obj := Get_Enclosing_Object (Renamed);
@@ -450,6 +452,7 @@ package body Lib.Xref is
-- The renamed expression denotes a non-object,
-- e.g. function call, slicing of a function call,
-- pointer dereference, etc.
+
if No (Obj) then
return Empty;
end if;