diff options
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 86 |
1 files changed, 66 insertions, 20 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index 4a902e82e4f..4eb1c8c6f47 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -298,7 +298,8 @@ package body Sinfo is or else NT (N).Nkind in N_Has_Entity or else NT (N).Nkind = N_Aggregate or else NT (N).Nkind = N_Extension_Aggregate - or else NT (N).Nkind = N_Selected_Component); + or else NT (N).Nkind = N_Selected_Component + or else NT (N).Nkind = N_Use_Package_Clause); return Node4 (N); end Associated_Node; @@ -1646,7 +1647,7 @@ package body Sinfo is pragma Assert (False or else NT (N).Nkind = N_Use_Package_Clause or else NT (N).Nkind = N_Use_Type_Clause); - return Elist4 (N); + return Elist5 (N); end Hidden_By_Use_Clause; function High_Bound @@ -1882,6 +1883,15 @@ package body Sinfo is return Flag18 (N); end Is_Dynamic_Coextension; + function Is_Effective_Use_Clause + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); + return Flag1 (N); + end Is_Effective_Use_Clause; + function Is_Elsif (N : Node_Id) return Boolean is begin @@ -2254,7 +2264,9 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Number_Declaration or else NT (N).Nkind = N_Object_Declaration - or else NT (N).Nkind = N_Parameter_Specification); + or else NT (N).Nkind = N_Parameter_Specification + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); return Flag5 (N); end More_Ids; @@ -2328,6 +2340,7 @@ package body Sinfo is or else NT (N).Nkind = N_Requeue_Statement or else NT (N).Nkind = N_Subprogram_Renaming_Declaration or else NT (N).Nkind = N_Subunit + or else NT (N).Nkind = N_Use_Package_Clause or else NT (N).Nkind = N_Variant_Part or else NT (N).Nkind = N_With_Clause); return Node2 (N); @@ -2337,8 +2350,7 @@ package body Sinfo is (N : Node_Id) return List_Id is begin pragma Assert (False - or else NT (N).Nkind = N_Abort_Statement - or else NT (N).Nkind = N_Use_Package_Clause); + or else NT (N).Nkind = N_Abort_Statement); return List2 (N); end Names; @@ -2723,10 +2735,21 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Number_Declaration or else NT (N).Nkind = N_Object_Declaration - or else NT (N).Nkind = N_Parameter_Specification); + or else NT (N).Nkind = N_Parameter_Specification + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); return Flag6 (N); end Prev_Ids; + function Prev_Use_Clause + (N : Node_Id) return Node_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); + return Node1 (N); + end Prev_Use_Clause; + function Print_In_Hex (N : Node_Id) return Boolean is begin @@ -3133,7 +3156,8 @@ package body Sinfo is or else NT (N).Nkind = N_Qualified_Expression or else NT (N).Nkind = N_Subtype_Indication or else NT (N).Nkind = N_Type_Conversion - or else NT (N).Nkind = N_Unchecked_Type_Conversion); + or else NT (N).Nkind = N_Unchecked_Type_Conversion + or else NT (N).Nkind = N_Use_Type_Clause); return Node4 (N); end Subtype_Mark; @@ -3141,8 +3165,7 @@ package body Sinfo is (N : Node_Id) return List_Id is begin pragma Assert (False - or else NT (N).Nkind = N_Unconstrained_Array_Definition - or else NT (N).Nkind = N_Use_Type_Clause); + or else NT (N).Nkind = N_Unconstrained_Array_Definition); return List2 (N); end Subtype_Marks; @@ -3338,7 +3361,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Use_Type_Clause); - return Elist5 (N); + return Elist2 (N); end Used_Operations; function Was_Expression_Function @@ -3609,7 +3632,8 @@ package body Sinfo is or else NT (N).Nkind in N_Has_Entity or else NT (N).Nkind = N_Aggregate or else NT (N).Nkind = N_Extension_Aggregate - or else NT (N).Nkind = N_Selected_Component); + or else NT (N).Nkind = N_Selected_Component + or else NT (N).Nkind = N_Use_Package_Clause); Set_Node4 (N, Val); -- semantic field, no parent set end Set_Associated_Node; @@ -4948,7 +4972,7 @@ package body Sinfo is pragma Assert (False or else NT (N).Nkind = N_Use_Package_Clause or else NT (N).Nkind = N_Use_Type_Clause); - Set_Elist4 (N, Val); + Set_Elist5 (N, Val); end Set_Hidden_By_Use_Clause; procedure Set_High_Bound @@ -5184,6 +5208,15 @@ package body Sinfo is Set_Flag18 (N, Val); end Set_Is_Dynamic_Coextension; + procedure Set_Is_Effective_Use_Clause + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); + Set_Flag1 (N, Val); + end Set_Is_Effective_Use_Clause; + procedure Set_Is_Elsif (N : Node_Id; Val : Boolean := True) is begin @@ -5556,7 +5589,9 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Number_Declaration or else NT (N).Nkind = N_Object_Declaration - or else NT (N).Nkind = N_Parameter_Specification); + or else NT (N).Nkind = N_Parameter_Specification + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); Set_Flag5 (N, Val); end Set_More_Ids; @@ -5630,6 +5665,7 @@ package body Sinfo is or else NT (N).Nkind = N_Requeue_Statement or else NT (N).Nkind = N_Subprogram_Renaming_Declaration or else NT (N).Nkind = N_Subunit + or else NT (N).Nkind = N_Use_Package_Clause or else NT (N).Nkind = N_Variant_Part or else NT (N).Nkind = N_With_Clause); Set_Node2_With_Parent (N, Val); @@ -5639,8 +5675,7 @@ package body Sinfo is (N : Node_Id; Val : List_Id) is begin pragma Assert (False - or else NT (N).Nkind = N_Abort_Statement - or else NT (N).Nkind = N_Use_Package_Clause); + or else NT (N).Nkind = N_Abort_Statement); Set_List2_With_Parent (N, Val); end Set_Names; @@ -6025,10 +6060,21 @@ package body Sinfo is or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Number_Declaration or else NT (N).Nkind = N_Object_Declaration - or else NT (N).Nkind = N_Parameter_Specification); + or else NT (N).Nkind = N_Parameter_Specification + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); Set_Flag6 (N, Val); end Set_Prev_Ids; + procedure Set_Prev_Use_Clause + (N : Node_Id; Val : Node_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Use_Package_Clause + or else NT (N).Nkind = N_Use_Type_Clause); + Set_Node1 (N, Val); -- semantic field, no parent set + end Set_Prev_Use_Clause; + procedure Set_Print_In_Hex (N : Node_Id; Val : Boolean := True) is begin @@ -6418,7 +6464,8 @@ package body Sinfo is or else NT (N).Nkind = N_Qualified_Expression or else NT (N).Nkind = N_Subtype_Indication or else NT (N).Nkind = N_Type_Conversion - or else NT (N).Nkind = N_Unchecked_Type_Conversion); + or else NT (N).Nkind = N_Unchecked_Type_Conversion + or else NT (N).Nkind = N_Use_Type_Clause); Set_Node4_With_Parent (N, Val); end Set_Subtype_Mark; @@ -6426,8 +6473,7 @@ package body Sinfo is (N : Node_Id; Val : List_Id) is begin pragma Assert (False - or else NT (N).Nkind = N_Unconstrained_Array_Definition - or else NT (N).Nkind = N_Use_Type_Clause); + or else NT (N).Nkind = N_Unconstrained_Array_Definition); Set_List2_With_Parent (N, Val); end Set_Subtype_Marks; @@ -6640,7 +6686,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Use_Type_Clause); - Set_Elist5 (N, Val); + Set_Elist2 (N, Val); end Set_Used_Operations; procedure Set_Was_Expression_Function |