aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-11-05 16:51:46 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-12-01 10:24:38 +0000
commitf05f68bc00755e39ed05a17e5f74483f151a7fee (patch)
tree7795685068096282f5d3d028c99042d1d2a5ae58
parentcf23d58df262c15d7f560078cdcc4570d318bcc1 (diff)
downloadgcc-f05f68bc00755e39ed05a17e5f74483f151a7fee.zip
gcc-f05f68bc00755e39ed05a17e5f74483f151a7fee.tar.gz
gcc-f05f68bc00755e39ed05a17e5f74483f151a7fee.tar.bz2
[Ada] Cleanup listing of representation info
gcc/ada/ * repinfo.adb (List_Entities): Simplify detection of entries; refactor potentially redundant comparison.
-rw-r--r--gcc/ada/repinfo.adb12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
index 75af649..36ad805 100644
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.adb
@@ -491,9 +491,7 @@ package body Repinfo is
-- been produced when listing the enclosing scope.
if List_Representation_Info_Mechanisms
- and then (Is_Subprogram (Ent)
- or else Ekind (Ent) = E_Entry
- or else Ekind (Ent) = E_Entry_Family)
+ and then Is_Subprogram_Or_Entry (Ent)
and then not In_Subprogram
then
List_Subprogram_Info (Ent);
@@ -541,12 +539,12 @@ package body Repinfo is
elsif Is_Record_Type (E) then
if List_Representation_Info >= 1 then
List_Record_Info (E, Bytes_Big_Endian);
- end if;
- -- Recurse into entities local to a record type
+ -- Recurse into entities local to a record type
- if List_Representation_Info = 4 then
- List_Entities (E, Bytes_Big_Endian, False);
+ if List_Representation_Info = 4 then
+ List_Entities (E, Bytes_Big_Endian, False);
+ end if;
end if;
elsif Is_Array_Type (E) then