summaryrefslogtreecommitdiff
path: root/gcc/ada/atree.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/atree.ads')
-rw-r--r--gcc/ada/atree.ads98
1 files changed, 95 insertions, 3 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index da0b28874c6..11787bc116e 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -461,6 +461,12 @@ package Atree is
-- function is used only by Sinfo.CN to change nodes into their
-- corresponding entities.
+ type Report_Proc is access procedure (Target : Node_Id; Source : Node_Id);
+
+ procedure Set_Reporting_Proc (P : Report_Proc);
+ -- Register a procedure that is invoked when a node is allocated, replaced
+ -- or rewritten.
+
type Traverse_Result is (Abandon, OK, OK_Orig, Skip);
-- This is the type of the result returned by the Process function passed
-- to Traverse_Func and Traverse_Proc. See below for details.
@@ -543,8 +549,12 @@ package Atree is
-- Tests given Id for inequality with the Empty node. This allows notations
-- like "if Present (Statement)" as opposed to "if Statement /= Empty".
- -- Node_Kind tests, like the functions in Sinfo, but the first argument is
- -- a Node_Id, and the tested field is Nkind (N).
+ ---------------------
+ -- Node_Kind Tests --
+ ---------------------
+
+ -- These are like the functions in Sinfo, but the first argument is a
+ -- Node_Id, and the tested field is Nkind (N).
function Nkind_In
(N : Node_Id;
@@ -617,6 +627,88 @@ package Atree is
pragma Inline (Nkind_In);
-- Inline all above functions
+ -----------------------
+ -- Entity_Kind_Tests --
+ -----------------------
+
+ -- Utility functions to test whether an Entity_Kind value, either given
+ -- directly as the first argument, or the Ekind field of an Entity give
+ -- as the first argument, matches any of the given list of Entity_Kind
+ -- values. Return True if any match, False if no match.
+
+ function Ekind_In
+ (E : Entity_Id;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (E : Entity_Id;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (E : Entity_Id;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (E : Entity_Id;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind;
+ V5 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (E : Entity_Id;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind;
+ V5 : Entity_Kind;
+ V6 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (T : Entity_Kind;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (T : Entity_Kind;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (T : Entity_Kind;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (T : Entity_Kind;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind;
+ V5 : Entity_Kind) return Boolean;
+
+ function Ekind_In
+ (T : Entity_Kind;
+ V1 : Entity_Kind;
+ V2 : Entity_Kind;
+ V3 : Entity_Kind;
+ V4 : Entity_Kind;
+ V5 : Entity_Kind;
+ V6 : Entity_Kind) return Boolean;
+
+ pragma Inline (Ekind_In);
+ -- Inline all above functions
+
-----------------------------
-- Entity Access Functions --
-----------------------------