* [COMMITTED] ada: Remove superfluous setter procedure
@ 2023-10-10 12:14 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-10-10 12:14 UTC (permalink / raw)
To: gcc-patches; +Cc: Eric Botcazou
From: Eric Botcazou <ebotcazou@adacore.com>
It is only called once.
gcc/ada/
* sem_util.ads (Set_Scope_Is_Transient): Delete.
* sem_util.adb (Set_Scope_Is_Transient): Likewise.
* exp_ch7.adb (Create_Transient_Scope): Set Is_Transient directly.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_ch7.adb | 2 +-
gcc/ada/sem_util.adb | 9 ---------
gcc/ada/sem_util.ads | 3 ---
3 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 5049de54dd7..00b7692c964 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -4529,7 +4529,7 @@ package body Exp_Ch7 is
Push_Scope (Trans_Scop);
Scope_Stack.Table (Scope_Stack.Last).Node_To_Be_Wrapped := Context;
- Set_Scope_Is_Transient;
+ Scope_Stack.Table (Scope_Stack.Last).Is_Transient := True;
-- The transient scope must also manage the secondary stack
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index e778bab95d1..26ddb52bc4a 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -27792,15 +27792,6 @@ package body Sem_Util is
end if;
end Set_Rep_Info;
- ----------------------------
- -- Set_Scope_Is_Transient --
- ----------------------------
-
- procedure Set_Scope_Is_Transient (V : Boolean := True) is
- begin
- Scope_Stack.Table (Scope_Stack.Last).Is_Transient := V;
- end Set_Scope_Is_Transient;
-
-------------------
-- Set_Size_Info --
-------------------
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 92016bc0eef..dda71e402b2 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -3165,9 +3165,6 @@ package Sem_Util is
-- from sub(type) entity T2 to (sub)type entity T1, as well as Is_Volatile
-- if T1 is a base type.
- procedure Set_Scope_Is_Transient (V : Boolean := True);
- -- Set the flag Is_Transient of the current scope
-
procedure Set_Size_Info (T1, T2 : Entity_Id);
pragma Inline (Set_Size_Info);
-- Copies the Esize field and Has_Biased_Representation flag from sub(type)
--
2.42.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-10 12:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 12:14 [COMMITTED] ada: Remove superfluous setter procedure Marc Poulhiès
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).