summaryrefslogtreecommitdiff
path: root/gcc/ada/namet.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:39:09 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-12 13:39:09 +0000
commitf67972d08b84f36797759f8bb41e18406eaf98ef (patch)
treee27f87221b0f53181765c2b6215be8e511e87490 /gcc/ada/namet.ads
parent51ea9c9440406d01a3861f1b049fd21af47f2a5d (diff)
downloadgcc-f67972d08b84f36797759f8bb41e18406eaf98ef.tar.gz
2013-04-12 Robert Dewar <dewar@adacore.com>
* exp_aggr.adb: Minor reformatting. * namet.ads, namet.adb (Nam_In): New functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197916 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/namet.ads')
-rw-r--r--gcc/ada/namet.ads51
1 files changed, 50 insertions, 1 deletions
diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads
index e8978f8b52f..facb1822dec 100644
--- a/gcc/ada/namet.ads
+++ b/gcc/ada/namet.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, 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- --
@@ -165,6 +165,55 @@ package Namet is
First_Name_Id : constant Name_Id := Names_Low_Bound + 2;
-- Subscript of first entry in names table
+ ------------------------------
+ -- Name_Id Membership Tests --
+ ------------------------------
+
+ -- The following functions allow a convenient notation for testing whether
+ -- a Name_Id value matches any one of a list of possible values. In each
+ -- case True is returned if the given T argument is equal to any of the V
+ -- arguments. These essentially duplicate the Ada 2012 membership tests,
+ -- but we cannot use the latter (yet) in the compiler front end, because
+ -- of bootstrap considerations
+
+ function Nam_In
+ (T : Name_Id;
+ V1 : Name_Id;
+ V2 : Name_Id) return Boolean;
+
+ function Nam_In
+ (T : Name_Id;
+ V1 : Name_Id;
+ V2 : Name_Id;
+ V3 : Name_Id) return Boolean;
+
+ function Nam_In
+ (T : Name_Id;
+ V1 : Name_Id;
+ V2 : Name_Id;
+ V3 : Name_Id;
+ V4 : Name_Id) return Boolean;
+
+ function Nam_In
+ (T : Name_Id;
+ V1 : Name_Id;
+ V2 : Name_Id;
+ V3 : Name_Id;
+ V4 : Name_Id;
+ V5 : Name_Id) return Boolean;
+
+ function Nam_In
+ (T : Name_Id;
+ V1 : Name_Id;
+ V2 : Name_Id;
+ V3 : Name_Id;
+ V4 : Name_Id;
+ V5 : Name_Id;
+ V6 : Name_Id) return Boolean;
+
+ pragma Inline (Nam_In);
+ -- Inline all above functions
+
-----------------
-- Subprograms --
-----------------