diff options
author | Emmanuel Briot <briot@adacore.com> | 2011-08-03 09:38:56 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-03 11:38:56 +0200 |
commit | 3479844114fb9da80145e748af1ba33c93127f6d (patch) | |
tree | 0bc869b54ef08222cffa183a6bc843f58a9b2a56 /gcc/ada/prj-attr.ads | |
parent | 4437a53072c556b2a81eb96c842c5448ffafa838 (diff) | |
download | gcc-3479844114fb9da80145e748af1ba33c93127f6d.zip gcc-3479844114fb9da80145e748af1ba33c93127f6d.tar.gz gcc-3479844114fb9da80145e748af1ba33c93127f6d.tar.bz2 |
prj-proc.adb, [...] (Get_Attribute_Index): do not systematically lower case attribute indexes that contain no "." Fix...
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
not systematically lower case attribute indexes that contain no "."
Fix definition of several Naming attributes, which take
a unit name as index and therefore should be case insensitive.
Minor refactoring (reduce length of variable names).
2011-08-03 Emmanuel Briot <briot@adacore.com>
* makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
From-SVN: r177250
Diffstat (limited to 'gcc/ada/prj-attr.ads')
-rw-r--r-- | gcc/ada/prj-attr.ads | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/prj-attr.ads b/gcc/ada/prj-attr.ads index a16e6f3..b171719 100644 --- a/gcc/ada/prj-attr.ads +++ b/gcc/ada/prj-attr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2011, 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- -- @@ -152,6 +152,21 @@ package Prj.Attr is (Attribute : Attribute_Node_Id) return Attribute_Kind; -- Returns the attribute kind of a known attribute. Returns Unknown if -- Attribute is Empty_Attribute. + -- + -- To use this function, the following code should be used: + -- Pkg : constant Package_Node_Id := + -- Prj.Attr.Package_Node_Id_Of (Name => <package name>); + -- Att : constant Attribute_Node_Id := + -- Prj.Attr.Attribute_Node_Id_Of + -- (Name => <attribute name>, + -- Starting_At => First_Attribute_Of (Pkg)); + -- Kind : constant Attribute_Kind := Attribute_Kind_Of (Att); + -- + -- However, you should not use this function once you have an already + -- parsed project tree. Instead, given a Project_Node_Id corresponding to + -- the attribute declaration ("for Attr (index) use ..."), it is simpler to + -- use + -- if Case_Insensitive (Attr, Tree) then ... procedure Set_Attribute_Kind_Of (Attribute : Attribute_Node_Id; |