diff mbox series

[COMMITTED] ada: Deconstruct unused flag Is_Expanded_Contract

Message ID 20240513083624.165520-1-poulhies@adacore.com
State New
Headers show
Series [COMMITTED] ada: Deconstruct unused flag Is_Expanded_Contract | expand

Commit Message

Marc Poulhiès May 13, 2024, 8:36 a.m. UTC
From: Piotr Trojanek <trojanek@adacore.com>

Flag Is_Expanded_Contract was introduced together with N_Contract field
(when implementing freezing of contracts), but was never actually used.

gcc/ada/

	* gen_il-fields.ads (Opt_Field_Enum):
	Remove Is_Expanded_Contract from the list of flags.
	* gen_il-gen-gen_nodes.adb (N_Contract): Remove
	Is_Expanded_Contract from the list of N_Contract fields.
	* sinfo.ads (Is_Expanded_Contract): Remove comments for the flag
	and its single occurrence in N_Contract.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/gen_il-fields.ads        | 1 -
 gcc/ada/gen_il-gen-gen_nodes.adb | 1 -
 gcc/ada/sinfo.ads                | 5 -----
 3 files changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads
index 594aeb68819..67074c60250 100644
--- a/gcc/ada/gen_il-fields.ads
+++ b/gcc/ada/gen_il-fields.ads
@@ -254,7 +254,6 @@  package Gen_IL.Fields is
       Is_Elsif,
       Is_Entry_Barrier_Function,
       Is_Expanded_Build_In_Place_Call,
-      Is_Expanded_Contract,
       Is_Folded_In_Parser,
       Is_Generic_Contract_Pragma,
       Is_Homogeneous_Aggregate,
diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb
index fb00993a95e..3a78ffb2009 100644
--- a/gcc/ada/gen_il-gen-gen_nodes.adb
+++ b/gcc/ada/gen_il-gen-gen_nodes.adb
@@ -1330,7 +1330,6 @@  begin -- Gen_IL.Gen.Gen_Nodes
    Cc (N_Contract, Node_Kind,
        (Sm (Classifications, Node_Id),
         Sm (Contract_Test_Cases, Node_Id),
-        Sm (Is_Expanded_Contract, Flag),
         Sm (Pre_Post_Conditions, Node_Id)));
 
    Cc (N_Derived_Type_Definition, Node_Kind,
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 06b9ad0884e..bee4491efde 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -1720,10 +1720,6 @@  package Sinfo is
    --    actuals to support a build-in-place style of call have been added to
    --    the call.
 
-   --  Is_Expanded_Contract
-   --    Present in N_Contract nodes. Set if the contract has already undergone
-   --    expansion activities.
-
    --  Is_Generic_Contract_Pragma
    --    This flag is present in N_Pragma nodes. It is set when the pragma is
    --    a source construct, applies to a generic unit or its body, and denotes
@@ -7959,7 +7955,6 @@  package Sinfo is
       --  Pre_Post_Conditions (set to Empty if none)
       --  Contract_Test_Cases (set to Empty if none)
       --  Classifications (set to Empty if none)
-      --  Is_Expanded_Contract
 
       --  Pre_Post_Conditions contains a collection of pragmas that correspond
       --  to pre- and postconditions associated with an entry or a subprogram