aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.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_ch5.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_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 9b34694..1f55af6 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1323,7 +1323,7 @@ package body Sem_Ch5 is
Reinit_Field_To_Zero (Ent, Enclosing_Scope);
end if;
- Set_Ekind (Ent, E_Block);
+ Mutate_Ekind (Ent, E_Block);
Generate_Reference (Ent, N, ' ');
Generate_Definition (Ent);
@@ -1970,7 +1970,7 @@ package body Sem_Ch5 is
Id : constant Node_Id := Defining_Identifier (N);
begin
Enter_Name (Id);
- Set_Ekind (Id, E_Label);
+ Mutate_Ekind (Id, E_Label);
Set_Etype (Id, Standard_Void_Type);
Set_Enclosing_Scope (Id, Current_Scope);
end Analyze_Implicit_Label_Declaration;
@@ -2164,7 +2164,7 @@ package body Sem_Ch5 is
-- Set the kind of the loop variable, which is not visible within the
-- iterator name.
- Set_Ekind (Def_Id, E_Variable);
+ Mutate_Ekind (Def_Id, E_Variable);
-- Provide a link between the iterator variable and the container, for
-- subsequent use in cross-reference and modification information.
@@ -2433,7 +2433,7 @@ package body Sem_Ch5 is
-- Prevent cascaded errors
- Set_Ekind (Def_Id, E_Loop_Parameter);
+ Mutate_Ekind (Def_Id, E_Loop_Parameter);
Set_Etype (Def_Id, Etype (First_Index (Typ)));
end if;
@@ -2445,7 +2445,7 @@ package body Sem_Ch5 is
-- Iteration over a container
else
- Set_Ekind (Def_Id, E_Loop_Parameter);
+ Mutate_Ekind (Def_Id, E_Loop_Parameter);
Error_Msg_Ada_2012_Feature ("container iterator", Sloc (N));
-- OF present
@@ -2498,7 +2498,7 @@ package body Sem_Ch5 is
-- element is a variable and is modifiable in the loop.
if Has_Aspect (Typ, Aspect_Variable_Indexing) then
- Set_Ekind (Def_Id, E_Variable);
+ Mutate_Ekind (Def_Id, E_Variable);
end if;
-- If the container is a constant, iterating over it
@@ -2669,7 +2669,7 @@ package body Sem_Ch5 is
procedure Analyze_Label_Entity (E : Entity_Id) is
begin
- Set_Ekind (E, E_Label);
+ Mutate_Ekind (E, E_Label);
Set_Etype (E, Standard_Void_Type);
Set_Enclosing_Scope (E, Current_Scope);
Set_Reachable (E, True);
@@ -3055,7 +3055,7 @@ package body Sem_Ch5 is
-- subsequent analysis of the condition in a quantified
-- expression.
- Set_Ekind (Id, E_Loop_Parameter);
+ Mutate_Ekind (Id, E_Loop_Parameter);
return;
end;
@@ -3118,7 +3118,7 @@ package body Sem_Ch5 is
Make_Index (DS, N);
end if;
- Set_Ekind (Id, E_Loop_Parameter);
+ Mutate_Ekind (Id, E_Loop_Parameter);
-- A quantified expression which appears in a pre- or post-condition may
-- be analyzed multiple times. The analysis of the range creates several
@@ -3746,7 +3746,7 @@ package body Sem_Ch5 is
and then Ekind (Homonym (Ent)) = E_Label
then
Set_Entity (Id, Ent);
- Set_Ekind (Ent, E_Loop);
+ Mutate_Ekind (Ent, E_Loop);
end if;
else
@@ -3761,7 +3761,7 @@ package body Sem_Ch5 is
if Ekind (Ent) = E_Label then
Reinit_Field_To_Zero (Ent, Enclosing_Scope);
- Set_Ekind (Ent, E_Loop);
+ Mutate_Ekind (Ent, E_Loop);
if Nkind (Parent (Ent)) = N_Implicit_Label_Declaration then
Set_Label_Construct (Parent (Ent), N);
@@ -3925,7 +3925,7 @@ package body Sem_Ch5 is
if not Of_Present (I_Spec)
or else not Is_Variable (Name (I_Spec))
then
- Set_Ekind (Id, E_Loop_Parameter);
+ Mutate_Ekind (Id, E_Loop_Parameter);
end if;
end;