diff options
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index ac2cc66ce31..0107aa0a45e 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2015, 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- -- @@ -539,10 +539,12 @@ package body Prj.Proc is The_Term := First_Term; while Present (The_Term) loop The_Current_Term := Current_Term (The_Term, From_Project_Node_Tree); - Current_Term_Kind := - Kind_Of (The_Current_Term, From_Project_Node_Tree); - case Current_Term_Kind is + if The_Current_Term /= Empty_Node then + Current_Term_Kind := + Kind_Of (The_Current_Term, From_Project_Node_Tree); + + case Current_Term_Kind is when N_Literal_String => @@ -578,7 +580,7 @@ package body Prj.Proc is else Shared.String_Elements.Table (Last).Next := String_Element_Table.Last - (Shared.String_Elements); + (Shared.String_Elements); end if; Last := String_Element_Table.Last @@ -586,8 +588,8 @@ package body Prj.Proc is Shared.String_Elements.Table (Last) := (Value => String_Value_Of - (The_Current_Term, - From_Project_Node_Tree), + (The_Current_Term, + From_Project_Node_Tree), Index => Source_Index_Of (The_Current_Term, From_Project_Node_Tree), @@ -743,7 +745,7 @@ package body Prj.Proc is The_Package := The_Project.Decl.Packages; while The_Package /= No_Package and then Shared.Packages.Table (The_Package).Name /= - The_Name + The_Name loop The_Package := Shared.Packages.Table (The_Package).Next; @@ -753,7 +755,7 @@ package body Prj.Proc is (The_Package /= No_Package, "package not found."); elsif Kind_Of (The_Current_Term, From_Project_Node_Tree) = - N_Attribute_Reference + N_Attribute_Reference then The_Package := No_Package; end if; @@ -886,8 +888,8 @@ package body Prj.Proc is else if Expression_Kind_Of - (The_Current_Term, From_Project_Node_Tree) = - List + (The_Current_Term, From_Project_Node_Tree) = + List then The_Variable := (Project => Project, @@ -1047,8 +1049,8 @@ package body Prj.Proc is else Shared.String_Elements.Table (Last).Next := - String_Element_Table.Last - (Shared.String_Elements); + String_Element_Table.Last + (Shared.String_Elements); end if; Last := @@ -1059,8 +1061,8 @@ package body Prj.Proc is (Value => The_Variable.Value, Display_Value => No_Name, Location => Location_Of - (The_Current_Term, - From_Project_Node_Tree), + (The_Current_Term, + From_Project_Node_Tree), Flag => False, Next => Nil_String, Index => 0); @@ -1108,7 +1110,7 @@ package body Prj.Proc is Index => 0); The_List := Shared.String_Elements.Table - (The_List).Next; + (The_List).Next; end loop; end; end case; @@ -1334,10 +1336,10 @@ package body Prj.Proc is String_Element_Table.Increment_Last (Shared.String_Elements); Shared.String_Elements.Table (Last).Next := - String_Element_Table.Last - (Shared.String_Elements); + String_Element_Table.Last + (Shared.String_Elements); Last := String_Element_Table.Last - (Shared.String_Elements); + (Shared.String_Elements); end if; end loop; @@ -1366,7 +1368,8 @@ package body Prj.Proc is "illegal node kind in an expression"); raise Program_Error; - end case; + end case; + end if; The_Term := Next_Term (The_Term, From_Project_Node_Tree); end loop; |