aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-02-24 08:13:36 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-07 05:29:23 -0400
commit2e02ab86744ccc97cc65d739ca515cb7d3b882d2 (patch)
tree7f8866412e6188f21a208a7fd8a12f9c2de698c6 /gcc/ada/sem_ch10.adb
parent1e4b06a8ec0db86e8398b8e9f4a98c8950bbd24f (diff)
downloadgcc-2e02ab86744ccc97cc65d739ca515cb7d3b882d2.zip
gcc-2e02ab86744ccc97cc65d739ca515cb7d3b882d2.tar.gz
gcc-2e02ab86744ccc97cc65d739ca515cb7d3b882d2.tar.bz2
[Ada] Variable-sized node types -- cleanup
gcc/ada/ * atree.ads, atree.adb, gen_il-gen.ads: Fix comments and clean up ??? marks. Rename Set_Ekind to be Mutate_Ekind. * einfo.ads, sinfo.ads: Likewise. Change "definitive definition" to "official definition", because the former sounds redundant. Rename Set_Ekind to be Mutate_Ekind. * checks.adb, contracts.adb, cstand.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_disp.adb, exp_dist.adb, exp_imgv.adb, exp_intr.adb, exp_prag.adb, exp_unst.adb, exp_util.adb, gen_il-gen.adb, inline.adb, lib-writ.adb, lib-xref-spark_specific.adb, sem_aggr.adb, sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_dist.adb, sem_elab.adb, sem_prag.adb, sem_util.adb: Rename Set_Ekind to be Mutate_Ekind.
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb29
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index c1b9253..ccfecf4b 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -1647,7 +1647,7 @@ package body Sem_Ch10 is
-- when we load the proper body.
Set_Scope (Id, Current_Scope);
- Set_Ekind (Id, E_Package_Body);
+ Mutate_Ekind (Id, E_Package_Body);
Set_Etype (Id, Standard_Void_Type);
if Has_Aspects (N) then
@@ -1989,7 +1989,7 @@ package body Sem_Ch10 is
Opts := Save_Config_Switches;
Set_Scope (Id, Current_Scope);
- Set_Ekind (Id, E_Protected_Body);
+ Mutate_Ekind (Id, E_Protected_Body);
Set_Etype (Id, Standard_Void_Type);
if Has_Aspects (N) then
@@ -2500,7 +2500,7 @@ package body Sem_Ch10 is
else
Set_Scope (Id, Current_Scope);
- Set_Ekind (Id, E_Task_Body);
+ Mutate_Ekind (Id, E_Task_Body);
Set_Etype (Id, Standard_Void_Type);
if Has_Aspects (N) then
@@ -4120,7 +4120,8 @@ package body Sem_Ch10 is
Set_Subtype_Indication (Decl,
New_Occurrence_Of (Non_Lim_View, Sloc (Def_Id)));
Set_Etype (Def_Id, Non_Lim_View);
- Set_Ekind (Def_Id, Subtype_Kind (Ekind (Non_Lim_View)));
+ Mutate_Ekind
+ (Def_Id, Subtype_Kind (Ekind (Non_Lim_View)));
Set_Analyzed (Decl, False);
-- Reanalyze the declaration, suppressing the call to
@@ -4986,7 +4987,7 @@ package body Sem_Ch10 is
-- Minimum decoration
- Set_Ekind (P, E_Package);
+ Mutate_Ekind (P, E_Package);
Set_Etype (P, Standard_Void_Type);
Set_Scope (P, Standard_Standard);
Set_Is_Visible_Lib_Unit (P);
@@ -5738,9 +5739,9 @@ package body Sem_Ch10 is
-- The abstract view of a variable is a state, not another variable
if Ekind (Ent) = E_Variable then
- Set_Ekind (Shadow, E_Abstract_State);
+ Mutate_Ekind (Shadow, E_Abstract_State);
else
- Set_Ekind (Shadow, Ekind (Ent));
+ Mutate_Ekind (Shadow, Ekind (Ent));
end if;
Set_Is_Internal (Shadow);
@@ -5785,7 +5786,7 @@ package body Sem_Ch10 is
procedure Decorate_Package (Ent : Entity_Id; Scop : Entity_Id) is
begin
- Set_Ekind (Ent, E_Package);
+ Mutate_Ekind (Ent, E_Package);
Set_Etype (Ent, Standard_Void_Type);
Set_Scope (Ent, Scop);
end Decorate_Package;
@@ -5796,7 +5797,7 @@ package body Sem_Ch10 is
procedure Decorate_State (Ent : Entity_Id; Scop : Entity_Id) is
begin
- Set_Ekind (Ent, E_Abstract_State);
+ Mutate_Ekind (Ent, E_Abstract_State);
Set_Etype (Ent, Standard_Void_Type);
Set_Scope (Ent, Scop);
Set_Encapsulating_State (Ent, Empty);
@@ -5818,7 +5819,7 @@ package body Sem_Ch10 is
-- An unanalyzed type or a shadow entity of a type is treated as an
-- incomplete type, and carries the corresponding attributes.
- Set_Ekind (Ent, E_Incomplete_Type);
+ Mutate_Ekind (Ent, E_Incomplete_Type);
Set_Etype (Ent, Ent);
Set_Full_View (Ent, Empty);
Set_Is_First_Subtype (Ent);
@@ -5854,7 +5855,7 @@ package body Sem_Ch10 is
Set_Parent (CW_Typ, Parent (Ent));
- Set_Ekind (CW_Typ, E_Class_Wide_Type);
+ Mutate_Ekind (CW_Typ, E_Class_Wide_Type);
Set_Class_Wide_Type (CW_Typ, CW_Typ);
Set_Etype (CW_Typ, Ent);
Set_Equivalent_Type (CW_Typ, Empty);
@@ -5874,7 +5875,7 @@ package body Sem_Ch10 is
procedure Decorate_Variable (Ent : Entity_Id; Scop : Entity_Id) is
begin
- Set_Ekind (Ent, E_Variable);
+ Mutate_Ekind (Ent, E_Variable);
Set_Etype (Ent, Standard_Void_Type);
Set_Scope (Ent, Scop);
end Decorate_Variable;
@@ -6229,7 +6230,7 @@ package body Sem_Ch10 is
-- must be minimally decorated. This ensures that the checks on unused
-- with clauses also process limieted withs.
- Set_Ekind (Pack, E_Package);
+ Mutate_Ekind (Pack, E_Package);
Set_Etype (Pack, Standard_Void_Type);
if Is_Entity_Name (Nam) then
@@ -6251,7 +6252,7 @@ package body Sem_Ch10 is
-- incomplete view of all types and packages declared within.
Shadow_Pack := Make_Temporary (Sloc (N), 'Z');
- Set_Ekind (Shadow_Pack, E_Package);
+ Mutate_Ekind (Shadow_Pack, E_Package);
Set_Is_Internal (Shadow_Pack);
Set_Limited_View (Pack, Shadow_Pack);