public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4007] [Ada] Add N_Is_Decl
@ 2021-10-01  6:14 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-01  6:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3e20570d9076d8792db2c22eb12261c47e161ab0

commit r12-4007-g3e20570d9076d8792db2c22eb12261c47e161ab0
Author: Richard Kenner <kenner@adacore.com>
Date:   Sat Aug 7 09:21:32 2021 -0400

    [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.

Diff:
---
 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 32cc89a081a..2d226bfb443 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 4aadf99cf77..f7de1501874 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,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-01  6:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01  6:14 [gcc r12-4007] [Ada] Add N_Is_Decl Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).