aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2008-08-20 16:27:11 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-20 16:27:11 +0200
commitd42ec90cbcf7c0098756f5f32c296d146c459d30 (patch)
tree1caa86c419ecaeee4f029a7aad19b51129359dbd
parentc0193e6ff2f412fc6d45934f2cf31eb913e00619 (diff)
downloadgcc-d42ec90cbcf7c0098756f5f32c296d146c459d30.zip
gcc-d42ec90cbcf7c0098756f5f32c296d146c459d30.tar.gz
gcc-d42ec90cbcf7c0098756f5f32c296d146c459d30.tar.bz2
prj-proc.adb (Process_Declarative_Items): Add Location for Array_Data
2008-08-20 Vincent Celier <celier@adacore.com> * prj-proc.adb (Process_Declarative_Items): Add Location for Array_Data * prj.ads (Array_Data): Add a component Location From-SVN: r139300
-rw-r--r--gcc/ada/prj-proc.adb38
-rw-r--r--gcc/ada/prj.ads7
2 files changed, 30 insertions, 15 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb
index 24d42e4..2fb4d75 100644
--- a/gcc/ada/prj-proc.adb
+++ b/gcc/ada/prj-proc.adb
@@ -1417,6 +1417,11 @@ package body Prj.Proc is
From_Project_Node_Tree);
-- The name of the attribute
+ Current_Location : constant Source_Ptr :=
+ Location_Of
+ (Current_Item,
+ From_Project_Node_Tree);
+
New_Array : Array_Id;
-- The new associative array created
@@ -1483,9 +1488,10 @@ package body Prj.Proc is
if Pkg /= No_Package then
In_Tree.Arrays.Table (New_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Location => Current_Location,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Packages.Table (Pkg).Decl.Arrays);
In_Tree.Packages.Table (Pkg).Decl.Arrays :=
@@ -1493,9 +1499,10 @@ package body Prj.Proc is
else
In_Tree.Arrays.Table (New_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Location => Current_Location,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Projects.Table (Project).Decl.Arrays);
In_Tree.Projects.Table (Project).Decl.Arrays :=
@@ -1706,6 +1713,11 @@ package body Prj.Proc is
(Current_Item,
From_Project_Node_Tree);
+ Current_Location : constant Source_Ptr :=
+ Location_Of
+ (Current_Item,
+ From_Project_Node_Tree);
+
begin
-- Process a typed variable declaration
@@ -1970,9 +1982,10 @@ package body Prj.Proc is
if Pkg /= No_Package then
In_Tree.Arrays.Table (The_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Location => Current_Location,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Packages.Table
(Pkg).Decl.Arrays);
@@ -1981,9 +1994,10 @@ package body Prj.Proc is
else
In_Tree.Arrays.Table (The_Array) :=
- (Name => Current_Item_Name,
- Value => No_Array_Element,
- Next =>
+ (Name => Current_Item_Name,
+ Location => Current_Location,
+ Value => No_Array_Element,
+ Next =>
In_Tree.Projects.Table
(Project).Decl.Arrays);
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 27fba81..9c16393 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -253,9 +253,10 @@ package Prj is
type Array_Id is new Nat;
No_Array : constant Array_Id := 0;
type Array_Data is record
- Name : Name_Id := No_Name;
- Value : Array_Element_Id := No_Array_Element;
- Next : Array_Id := No_Array;
+ Name : Name_Id := No_Name;
+ Location : Source_Ptr := No_Location;
+ Value : Array_Element_Id := No_Array_Element;
+ Next : Array_Id := No_Array;
end record;
-- Each Array_Data value represents an array.
-- Value is the id of the first element.