aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-03-08 11:41:42 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-25 09:44:18 +0200
commit50832e4a92988e3c3388fa24871cd960828ac3f7 (patch)
tree1735744b2a16cddb3ebdac19128ab2eb3eaec1a2
parentd50e1383be73ef9cdc9f0d0813fa0e1208657789 (diff)
downloadgcc-50832e4a92988e3c3388fa24871cd960828ac3f7.zip
gcc-50832e4a92988e3c3388fa24871cd960828ac3f7.tar.gz
gcc-50832e4a92988e3c3388fa24871cd960828ac3f7.tar.bz2
ada: Deconstruct a no longer used parameter of New_Copy_Tree
Parameter Scopes_In_EWA_OK of New_Copy_Tree was introduced in 2018 to deal with expressions-with-actions (EWA) in the build-in-place machinery. However, after changes made in 2022 it is no longer used by any caller. Cleanup related to handling of expression functions in GNATprove; semantics is unaffected. gcc/ada/ * sem_util.ads (New_Copy_Tree): Remove Scopes_In_EWA_OK from spec; adapt comment. * sem_util.adb (New_Copy_Tree): Remove Scopes_In_EWA_OK from body; adapt code.
-rw-r--r--gcc/ada/sem_util.adb16
-rw-r--r--gcc/ada/sem_util.ads13
2 files changed, 10 insertions, 19 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 8b536ec..b83c759 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -23067,11 +23067,10 @@ package body Sem_Util is
-------------------
function New_Copy_Tree
- (Source : Node_Id;
- Map : Elist_Id := No_Elist;
- New_Sloc : Source_Ptr := No_Location;
- New_Scope : Entity_Id := Empty;
- Scopes_In_EWA_OK : Boolean := False) return Node_Id
+ (Source : Node_Id;
+ Map : Elist_Id := No_Elist;
+ New_Sloc : Source_Ptr := No_Location;
+ New_Scope : Entity_Id := Empty) return Node_Id
is
-- This routine performs low-level tree manipulations and needs access
-- to the internals of the tree.
@@ -24030,12 +24029,9 @@ package body Sem_Util is
return;
-- Nothing to do when the entity is defined in a scoping construct
- -- within an N_Expression_With_Actions node, unless the caller has
- -- requested their replication.
+ -- within an N_Expression_With_Actions node.
- -- ??? should this restriction be eliminated?
-
- elsif EWA_Inner_Scope_Level > 0 and then not Scopes_In_EWA_OK then
+ elsif EWA_Inner_Scope_Level > 0 then
return;
-- Nothing to do when the entity does not denote a construct that
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 4962c62..185cf2c 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -2630,11 +2630,10 @@ package Sem_Util is
-- names to facilitate debugging the tree copy.
function New_Copy_Tree
- (Source : Node_Id;
- Map : Elist_Id := No_Elist;
- New_Sloc : Source_Ptr := No_Location;
- New_Scope : Entity_Id := Empty;
- Scopes_In_EWA_OK : Boolean := False) return Node_Id;
+ (Source : Node_Id;
+ Map : Elist_Id := No_Elist;
+ New_Sloc : Source_Ptr := No_Location;
+ New_Scope : Entity_Id := Empty) return Node_Id;
-- Perform a deep copy of the subtree rooted at Source. Entities, itypes,
-- and nodes are handled separately as follows:
--
@@ -2704,10 +2703,6 @@ package Sem_Util is
--
-- Parameter New_Scope may be used to specify a new scope for all copied
-- entities and itypes.
- --
- -- Parameter Scopes_In_EWA_OK may be used to force the replication of both
- -- scoping entities and non-scoping entities found within expression with
- -- actions nodes.
function New_External_Entity
(Kind : Entity_Kind;