diff options
author | Richard Kenner <kenner@adacore.com> | 2021-08-07 09:21:32 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-01 06:13:35 +0000 |
commit | 3e20570d9076d8792db2c22eb12261c47e161ab0 (patch) | |
tree | 5f7f7521efb07606651b374179ace530b4de66d1 /gcc | |
parent | 7916838b6674e7d0ed0c488d22e89e2b679f1292 (diff) | |
download | gcc-3e20570d9076d8792db2c22eb12261c47e161ab0.zip gcc-3e20570d9076d8792db2c22eb12261c47e161ab0.tar.gz gcc-3e20570d9076d8792db2c22eb12261c47e161ab0.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/gen_il-gen-gen_nodes.adb | 16 | ||||
-rw-r--r-- | gcc/ada/gen_il-types.ads | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb index 32cc89a..2d226bf 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 4aadf99..f7de15018 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, |