public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5041] [Ada] Print Storage_Pool and Procedure_To_Call fields Date: Tue, 9 Nov 2021 09:47:37 +0000 (GMT) [thread overview] Message-ID: <20211109094737.4E6393858000@sourceware.org> (raw) https://gcc.gnu.org/g:5861b128b9942ef92b3755610b0459273e7cf234 commit r12-5041-g5861b128b9942ef92b3755610b0459273e7cf234 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Mon Nov 1 10:30:51 2021 +0100 [Ada] Print Storage_Pool and Procedure_To_Call fields gcc/ada/ * sprint.adb (Sprint_Node_Actual) <N_Allocator>: Also print the Procedure_To_Call field if it is present. <N_Extended_Return_Statement>: Also print the Storage_Pool and Procedure_To_Call fields if they are present. <N_Free_Statement>: Likewise. <N_Simple_Return_Statement>: Likewise. Diff: --- gcc/ada/sprint.adb | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 69996cbbc00..611563a1f22 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -1116,6 +1116,12 @@ package body Sprint is Write_Char (']'); end if; + if Present (Procedure_To_Call (Node)) then + Write_Str_With_Col_Check ("[procedure_to_call = "); + Sprint_Node (Procedure_To_Call (Node)); + Write_Char (']'); + end if; + when N_And_Then => Sprint_Left_Opnd (Node); Write_Str_Sloc (" and then "); @@ -1785,11 +1791,23 @@ package body Sprint is if Present (Handled_Statement_Sequence (Node)) then Write_Str_With_Col_Check (" do"); Sprint_Node (Handled_Statement_Sequence (Node)); - Write_Indent_Str ("end return;"); - else - Write_Indent_Str (";"); + Write_Indent_Str ("end return"); + end if; + + if Present (Storage_Pool (Node)) then + Write_Str_With_Col_Check ("[storage_pool = "); + Sprint_Node (Storage_Pool (Node)); + Write_Char (']'); end if; + if Present (Procedure_To_Call (Node)) then + Write_Str_With_Col_Check ("[procedure_to_call = "); + Sprint_Node (Procedure_To_Call (Node)); + Write_Char (']'); + end if; + + Write_Char (';'); + when N_Delta_Aggregate => Write_Str_With_Col_Check_Sloc ("("); Sprint_Node (Expression (Node)); @@ -1973,6 +1991,19 @@ package body Sprint is when N_Free_Statement => Write_Indent_Str_Sloc ("free "); Sprint_Node (Expression (Node)); + + if Present (Storage_Pool (Node)) then + Write_Str_With_Col_Check ("[storage_pool = "); + Sprint_Node (Storage_Pool (Node)); + Write_Char (']'); + end if; + + if Present (Procedure_To_Call (Node)) then + Write_Str_With_Col_Check ("[procedure_to_call = "); + Sprint_Node (Procedure_To_Call (Node)); + Write_Char (']'); + end if; + Write_Char (';'); when N_Freeze_Entity => @@ -3170,11 +3201,24 @@ package body Sprint is if Present (Expression (Node)) then Write_Indent_Str_Sloc ("return "); Sprint_Node (Expression (Node)); - Write_Char (';'); else - Write_Indent_Str_Sloc ("return;"); + Write_Indent_Str_Sloc ("return"); + end if; + + if Present (Storage_Pool (Node)) then + Write_Str_With_Col_Check ("[storage_pool = "); + Sprint_Node (Storage_Pool (Node)); + Write_Char (']'); end if; + if Present (Procedure_To_Call (Node)) then + Write_Str_With_Col_Check ("[procedure_to_call = "); + Sprint_Node (Procedure_To_Call (Node)); + Write_Char (']'); + end if; + + Write_Char (';'); + when N_Selective_Accept => Write_Indent_Str_Sloc ("select");
reply other threads:[~2021-11-09 9:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211109094737.4E6393858000@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).