summaryrefslogtreecommitdiffstats
path: root/gcc/ada/prj.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 09:17:28 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 09:17:28 +0000
commit132f079abbcfa82c414832aad3aedfe77f2049f6 (patch)
tree2f36ebbabd6d8f0da8f9326f7c1404ccfd4d24e2 /gcc/ada/prj.ads
parent1ae09faf95d176592771bfea4c47aee3fa3645be (diff)
downloadppe42-gcc-132f079abbcfa82c414832aad3aedfe77f2049f6.tar.gz
ppe42-gcc-132f079abbcfa82c414832aad3aedfe77f2049f6.zip
2011-08-03 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK restriction on overloaded entity if the entity is not an operator. 2011-08-03 Yannick Moy <moy@adacore.com> * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb, restrict.ads: Rename remaining Check_Formal_Restriction* into Check_SPARK_Restriction*. 2011-08-03 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its qualifier. (Project_Empty): removed (Empty_Project): new parameter Qualifier This is used to have fields specific to aggregate projects, cleaner New field to store the list of aggregated projects. (Check_Aggregate_Project): removed (Process_Aggregated_Projects, Free): new subprograms. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177243 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj.ads')
-rw-r--r--gcc/ada/prj.ads57
1 files changed, 46 insertions, 11 deletions
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index 202e70aeca9..db53aa08155 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -1086,13 +1086,34 @@ package Prj is
Lib_Maj_Min_Id_Supported => False,
Auto_Init_Supported => False);
- -- The following record describes a project file representation
+ -------------------------
+ -- Aggregated projects --
+ -------------------------
+
+ type Aggregated_Project;
+ type Aggregated_Project_List is access all Aggregated_Project;
+ type Aggregated_Project is record
+ Path : Path_Name_Type;
+ Project : Project_Id;
+ Next : Aggregated_Project_List;
+ end record;
+
+ procedure Free (List : in out Aggregated_Project_List);
+ -- Free the memory used for List
- -- Note that it is not specified if the path names of directories (source,
- -- object, library or exec directories) end with or without a directory
- -- separator.
+ procedure Add_Aggregated_Project
+ (Project : Project_Id; Path : Path_Name_Type);
+ -- Add a new aggregated project in Project.
+ -- The aggregated project has not been processed yet. This procedure should
+ -- the called while processing the aggregate project, and as a result
+ -- Prj.Proc.Process will then automatically process the aggregated projects
- type Project_Data is record
+ ------------------
+ -- Project_Data --
+ ------------------
+ -- The following record describes a project file representation
+
+ type Project_Data (Qualifier : Project_Qualifier := Unspecified) is record
-------------
-- General --
@@ -1104,9 +1125,6 @@ package Prj is
Display_Name : Name_Id := No_Name;
-- The name of the project with the spelling of its declaration
- Qualifier : Project_Qualifier := Unspecified;
- -- The eventual qualifier for this project
-
Externally_Built : Boolean := False;
-- True if the project is externally built. In such case, the Project
-- Manager will not modify anything in this project.
@@ -1152,10 +1170,10 @@ package Prj is
-- The declarations (variables, attributes and packages) of this project
-- file.
- Imported_Projects : Project_List;
+ Imported_Projects : Project_List := null;
-- The list of all directly imported projects, if any
- All_Imported_Projects : Project_List;
+ All_Imported_Projects : Project_List := null;
-- The list of all projects imported directly or indirectly, if any.
-- This does not include the project itself.
@@ -1295,9 +1313,21 @@ package Prj is
-- True if there are comments in the project sources that cannot be kept
-- in the project tree.
+ -----------------------------
+ -- qualifier-specific data --
+ -----------------------------
+ -- The following fields are only valid for specific types of projects.
+
+ case Qualifier is
+ when Aggregate =>
+ Aggregated_Projects : Aggregated_Project_List := null;
+
+ when others =>
+ null;
+ end case;
end record;
- function Empty_Project return Project_Data;
+ function Empty_Project (Qualifier : Project_Qualifier) return Project_Data;
-- Return the representation of an empty project
function Is_Extending
@@ -1432,6 +1462,7 @@ package Prj is
procedure For_Every_Project_Imported
(By : Project_Id;
With_State : in out State;
+ Include_Aggregated : Boolean := True;
Imported_First : Boolean := False);
-- Call Action for each project imported directly or indirectly by project
-- By, as well as extended projects.
@@ -1448,6 +1479,10 @@ package Prj is
--
-- With_State may be used by Action to choose a behavior or to report some
-- global result.
+ --
+ -- If Include_Aggregated is True, then an aggregate project will recurse
+ -- into the projects it aggregates. Otherwise, the latter are never
+ -- returned
function Extend_Name
(File : File_Name_Type;
OpenPOWER on IntegriCloud