aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-util.adb
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2007-10-15 15:55:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-10-15 15:55:54 +0200
commit1b68567490b702d200be15437d69449f9becfe8d (patch)
treed473c56824326a8cc5ef2a16bc73fee0a57b0839 /gcc/ada/prj-util.adb
parentc16dd6a8559cddeb9a5fdf777d8b1f9cc775a627 (diff)
downloadgcc-1b68567490b702d200be15437d69449f9becfe8d.zip
gcc-1b68567490b702d200be15437d69449f9becfe8d.tar.gz
gcc-1b68567490b702d200be15437d69449f9becfe8d.tar.bz2
snames.adb, snames.ads: Add new standard name runtime_library_dir
2007-10-15 Vincent Celier <celier@adacore.com> * snames.adb, snames.ads: Add new standard name runtime_library_dir * prj.ads (Language_Config): Add new component Runtime_Library_Dir * prj-attr.adb: Add project level attribute Runtime_Library_Dir * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of the source is unknown. * prj-ext.adb: Spelling error fix * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada 95 reserved word in its name. (Process_Project_Level_Array_Attributes): Process new attribute Runtime_Library_Dir. * prj-part.adb (Parse_Single_Project): Do not check the name of the config project against the user project names. * prj-proc.adb (Expression): In multi-language mode, indexes that do not include a dot are always case insensitive. (Process_Declarative_Items): Ditto (Process_Project_Tree_Phase_1): Set Success to False in case an error is detected. * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is True, compare both indexes in lower case. From-SVN: r129329
Diffstat (limited to 'gcc/ada/prj-util.adb')
-rw-r--r--gcc/ada/prj-util.adb20
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/prj-util.adb b/gcc/ada/prj-util.adb
index 1917bd2..c41c3da 100644
--- a/gcc/ada/prj-util.adb
+++ b/gcc/ada/prj-util.adb
@@ -524,9 +524,10 @@ package body Prj.Util is
In_Tree : Project_Tree_Ref;
Force_Lower_Case_Index : Boolean := False) return Variable_Value
is
- Current : Array_Element_Id;
- Element : Array_Element;
- Real_Index : Name_Id;
+ Current : Array_Element_Id;
+ Element : Array_Element;
+ Real_Index_1 : Name_Id;
+ Real_Index_2 : Name_Id;
begin
Current := In_Array;
@@ -537,18 +538,25 @@ package body Prj.Util is
Element := In_Tree.Array_Elements.Table (Current);
- Real_Index := Index;
+ Real_Index_1 := Index;
if not Element.Index_Case_Sensitive or Force_Lower_Case_Index then
Get_Name_String (Index);
To_Lower (Name_Buffer (1 .. Name_Len));
- Real_Index := Name_Find;
+ Real_Index_1 := Name_Find;
end if;
while Current /= No_Array_Element loop
Element := In_Tree.Array_Elements.Table (Current);
+ Real_Index_2 := Element.Index;
+
+ if not Element.Index_Case_Sensitive or Force_Lower_Case_Index then
+ Get_Name_String (Element.Index);
+ To_Lower (Name_Buffer (1 .. Name_Len));
+ Real_Index_2 := Name_Find;
+ end if;
- if Real_Index = Element.Index and then
+ if Real_Index_1 = Real_Index_2 and then
Src_Index = Element.Src_Index
then
return Element.Value;