From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id AFDA33858D28; Wed, 1 Dec 2021 10:25:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFDA33858D28 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5655] [Ada] Cleanup listing of representation info X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: cf23d58df262c15d7f560078cdcc4570d318bcc1 X-Git-Newrev: f05f68bc00755e39ed05a17e5f74483f151a7fee Message-Id: <20211201102513.AFDA33858D28@sourceware.org> Date: Wed, 1 Dec 2021 10:25:13 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 10:25:13 -0000 https://gcc.gnu.org/g:f05f68bc00755e39ed05a17e5f74483f151a7fee commit r12-5655-gf05f68bc00755e39ed05a17e5f74483f151a7fee Author: Piotr Trojanek Date: Fri Nov 5 16:51:46 2021 +0100 [Ada] Cleanup listing of representation info gcc/ada/ * repinfo.adb (List_Entities): Simplify detection of entries; refactor potentially redundant comparison. Diff: --- gcc/ada/repinfo.adb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 75af649e166..36ad8050d1f 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