prj.adb: Minor code refactoring.

2011-09-02  Pascal Obry  <obry@adacore.com>

	* prj.adb: Minor code refactoring. Move check for null project in
	Project_Changed.
	* projects.texi: Fix minor typos.

From-SVN: r178444
This commit is contained in:
Pascal Obry 2011-09-02 09:04:38 +00:00 committed by Arnaud Charlet
parent 86828d402f
commit 735ca1b90d
3 changed files with 23 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2011-09-02 Pascal Obry <obry@adacore.com>
* prj.adb: Minor code refactoring. Move check for null project in
Project_Changed.
* projects.texi: Fix minor typos.
2011-09-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): If the domain

View File

@ -366,8 +366,10 @@ package body Prj is
procedure Project_Changed (Iter : in out Source_Iterator) is
begin
Iter.Language := Iter.Project.Project.Languages;
Language_Changed (Iter);
if Iter.Project /= null then
Iter.Language := Iter.Project.Project.Languages;
Language_Changed (Iter);
end if;
end Project_Changed;
----------------------
@ -392,9 +394,7 @@ package body Prj is
if Iter.All_Projects then
Iter.Project := Iter.Project.Next;
if Iter.Project /= null then
Project_Changed (Iter);
end if;
Project_Changed (Iter);
else
Iter.Project := null;
@ -493,7 +493,6 @@ package body Prj is
Tree : Project_Tree_Ref)
is
List : Project_List;
Agg : Aggregated_Project_List;
begin
if not Get (Seen, Project) then
@ -525,12 +524,16 @@ package body Prj is
if Include_Aggregated
and then Project.Qualifier = Aggregate
then
Agg := Project.Aggregated_Projects;
while Agg /= null loop
pragma Assert (Agg.Project /= No_Project);
Recursive_Check (Agg.Project, Agg.Tree);
Agg := Agg.Next;
end loop;
declare
Agg : Aggregated_Project_List;
begin
Agg := Project.Aggregated_Projects;
while Agg /= null loop
pragma Assert (Agg.Project /= No_Project);
Recursive_Check (Agg.Project, Agg.Tree);
Agg := Agg.Next;
end loop;
end;
end if;
if Imported_First then

View File

@ -2307,7 +2307,7 @@ attributes and packages are forbidden in an aggregate project. Here is the
@itemize @bullet
@item Languages
@item Source_files, Source_List_File and other attributes dealing with
@item Source_Files, Source_List_File and other attributes dealing with
list of sources.
@item Source_Dirs, Exec_Dir and Object_Dir
@item Library_Dir, Library_Name and other library-related attributes
@ -2317,7 +2317,7 @@ attributes and packages are forbidden in an aggregate project. Here is the
@item Inherit_Source_Path
@item Excluded_Source_Dirs
@item Locally_Removed_Files
@item Excluded_Source_Fies
@item Excluded_Source_Files
@item Excluded_Source_List_File
@item Interfaces
@end itemize