From 3e20570d9076d8792db2c22eb12261c47e161ab0 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sat, 7 Aug 2021 09:21:32 -0400 Subject: [PATCH] [Ada] Add N_Is_Decl gcc/ada/ * gen_il-gen-gen_nodes.adb (N_Is_Decl): Add. * gen_il-types.ads (N_Is_Decl): Likewise. --- gcc/ada/gen_il-gen-gen_nodes.adb | 16 +++++++++++++++- gcc/ada/gen_il-types.ads | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb index 32cc89a081a8..2d226bfb4439 100644 --- a/gcc/ada/gen_il-gen-gen_nodes.adb +++ b/gcc/ada/gen_il-gen-gen_nodes.adb @@ -577,7 +577,8 @@ begin -- Gen_IL.Gen.Gen_Nodes Ab (N_Declaration, Node_Kind); -- Note: this includes all constructs normally thought of as declarations - -- except those that are separately grouped in N_Later_Decl_Item. + -- except those that are separately grouped in N_Later_Decl_Item. But + -- Declaration_Node may return yet more node types; see N_Is_Decl below. Cc (N_Component_Declaration, N_Declaration, (Sy (Defining_Identifier, Node_Id), @@ -1672,4 +1673,17 @@ begin -- Gen_IL.Gen.Gen_Nodes -- Some N_Attribute_Reference nodes may also represent an entity. See -- Is_Entity_Name. + Union (N_Is_Decl, + Children => + (N_Declaration, + N_Discriminant_Specification, + N_Enumeration_Type_Definition, + N_Exception_Handler, + N_Later_Decl_Item, + N_Package_Specification, + N_Parameter_Specification, + N_Renaming_Declaration, + N_Subprogram_Specification)); + -- Nodes that can be returned by Declaration_Node + end Gen_IL.Gen.Gen_Nodes; diff --git a/gcc/ada/gen_il-types.ads b/gcc/ada/gen_il-types.ads index 4aadf99cf776..f7de1501874d 100644 --- a/gcc/ada/gen_il-types.ads +++ b/gcc/ada/gen_il-types.ads @@ -94,6 +94,7 @@ package Gen_IL.Types is N_Has_Condition, N_Has_Entity, N_Has_Etype, + N_Is_Decl, N_Is_Index, N_Multiplying_Operator, N_Later_Decl_Item, -- 2.47.2