diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-07-26 15:24:29 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-20 03:21:54 -0400 |
commit | 8f70460005d4fe3f8784000c631449c09c8ce57a (patch) | |
tree | 748c5166553d2bd87a71ebf71b53da9715fc0f7d | |
parent | 420021eaee552b73c2b3c7031c983b605efcc59c (diff) | |
download | gcc-8f70460005d4fe3f8784000c631449c09c8ce57a.zip gcc-8f70460005d4fe3f8784000c631449c09c8ce57a.tar.gz gcc-8f70460005d4fe3f8784000c631449c09c8ce57a.tar.bz2 |
[Ada] Refine type for type constraining routines
gcc/ada/
* sem_ch3.adb (Constrain_Decimal, Constrain_Enumeration,
Constrain_Float, Constrain_Integer, Constrain_Ordinary_Fixed):
Refine parameter type from Node_Id to Entity_Id.
-rw-r--r-- | gcc/ada/sem_ch3.adb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 91e4ebb..be5ed67 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -410,7 +410,7 @@ package body Sem_Ch3 is -- When constraining a protected type or task type with discriminants, -- constrain the corresponding record with the same discriminant values. - procedure Constrain_Decimal (Def_Id : Node_Id; S : Node_Id); + procedure Constrain_Decimal (Def_Id : Entity_Id; S : Node_Id); -- Constrain a decimal fixed point type with a digits constraint and/or a -- range constraint, and build E_Decimal_Fixed_Point_Subtype entity. @@ -426,11 +426,11 @@ package body Sem_Ch3 is -- Constrain_Concurrent. See Build_Discriminated_Subtype for an explanation -- of For_Access. - procedure Constrain_Enumeration (Def_Id : Node_Id; S : Node_Id); + procedure Constrain_Enumeration (Def_Id : Entity_Id; S : Node_Id); -- Constrain an enumeration type with a range constraint. This is identical -- to Constrain_Integer, but for the Ekind of the resulting subtype. - procedure Constrain_Float (Def_Id : Node_Id; S : Node_Id); + procedure Constrain_Float (Def_Id : Entity_Id; S : Node_Id); -- Constrain a floating point type with either a digits constraint -- and/or a range constraint, building a E_Floating_Point_Subtype. @@ -447,10 +447,10 @@ package body Sem_Ch3 is -- array. The Related_Id and Suffix parameters are used to build the -- associated Implicit type name. - procedure Constrain_Integer (Def_Id : Node_Id; S : Node_Id); + procedure Constrain_Integer (Def_Id : Entity_Id; S : Node_Id); -- Build subtype of a signed or modular integer type - procedure Constrain_Ordinary_Fixed (Def_Id : Node_Id; S : Node_Id); + procedure Constrain_Ordinary_Fixed (Def_Id : Entity_Id; S : Node_Id); -- Constrain an ordinary fixed point type with a range constraint, and -- build an E_Ordinary_Fixed_Point_Subtype entity. @@ -13800,7 +13800,7 @@ package body Sem_Ch3 is -- Constrain_Decimal -- ----------------------- - procedure Constrain_Decimal (Def_Id : Node_Id; S : Node_Id) is + procedure Constrain_Decimal (Def_Id : Entity_Id; S : Node_Id) is T : constant Entity_Id := Entity (Subtype_Mark (S)); C : constant Node_Id := Constraint (S); Loc : constant Source_Ptr := Sloc (C); @@ -14017,7 +14017,7 @@ package body Sem_Ch3 is -- Constrain_Enumeration -- --------------------------- - procedure Constrain_Enumeration (Def_Id : Node_Id; S : Node_Id) is + procedure Constrain_Enumeration (Def_Id : Entity_Id; S : Node_Id) is T : constant Entity_Id := Entity (Subtype_Mark (S)); C : constant Node_Id := Constraint (S); @@ -14040,7 +14040,7 @@ package body Sem_Ch3 is -- Constrain_Float -- ---------------------- - procedure Constrain_Float (Def_Id : Node_Id; S : Node_Id) is + procedure Constrain_Float (Def_Id : Entity_Id; S : Node_Id) is T : constant Entity_Id := Entity (Subtype_Mark (S)); C : Node_Id; D : Node_Id; @@ -14249,7 +14249,7 @@ package body Sem_Ch3 is -- Constrain_Integer -- ----------------------- - procedure Constrain_Integer (Def_Id : Node_Id; S : Node_Id) is + procedure Constrain_Integer (Def_Id : Entity_Id; S : Node_Id) is T : constant Entity_Id := Entity (Subtype_Mark (S)); C : constant Node_Id := Constraint (S); @@ -14272,7 +14272,7 @@ package body Sem_Ch3 is -- Constrain_Ordinary_Fixed -- ------------------------------ - procedure Constrain_Ordinary_Fixed (Def_Id : Node_Id; S : Node_Id) is + procedure Constrain_Ordinary_Fixed (Def_Id : Entity_Id; S : Node_Id) is T : constant Entity_Id := Entity (Subtype_Mark (S)); C : Node_Id; D : Node_Id; |