[multiple changes]

2009-04-29  Robert Dewar  <dewar@adacore.com>

	* rtsfind.adb, prj-env.adb: Minor reformatting
	Minor code reorganization

2009-04-29  Emmanuel Briot  <briot@adacore.com>

	* make.adb: Fix comment

	* prj.adb (Ultimate_Extending_Project_Of): Fix handling when no project
	is given as argument, as might happen in gnatmake.

From-SVN: r146935
This commit is contained in:
Arnaud Charlet 2009-04-29 11:32:55 +02:00
parent 8f983e64b2
commit 0b8074edf5
5 changed files with 31 additions and 9 deletions

View File

@ -1,3 +1,15 @@
2009-04-29 Robert Dewar <dewar@adacore.com>
* rtsfind.adb, prj-env.adb: Minor reformatting
Minor code reorganization
2009-04-29 Emmanuel Briot <briot@adacore.com>
* make.adb: Fix comment
* prj.adb (Ultimate_Extending_Project_Of): Fix handling when no project
is given as argument, as might happen in gnatmake.
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Abstract_Overriding): Improve error message when

View File

@ -7469,7 +7469,7 @@ package body Make is
begin
if Prj.Depth >= Depth
or Get (Seen, Prj) -- or needed instead of or else ???
or else Get (Seen, Prj)
then
return;
end if;

View File

@ -954,11 +954,13 @@ package body Prj.Env is
end if;
-- If language is defined
else
-- For all source of the Language of all projects in the closure
declare
P : Project_List;
begin
P := In_Tree.Projects;
while P /= null loop
@ -1054,7 +1056,7 @@ package body Prj.Env is
procedure Delete_All_Path_Files (In_Tree : Project_Tree_Ref) is
Disregard : Boolean := True;
pragma Warnings (Off, Disregard);
pragma Unreferenced (Disregard);
begin
for Index in Path_File_Table.First ..
@ -1846,9 +1848,10 @@ package body Prj.Env is
function Ultimate_Extension_Of
(Project : Project_Id) return Project_Id
is
Result : Project_Id := Project;
Result : Project_Id;
begin
Result := Project;
while Result.Extended_By /= No_Project loop
Result := Result.Extended_By;
end loop;

View File

@ -828,6 +828,7 @@ package body Prj is
procedure Free (Project : in out Project_Id; Reset_Only : Boolean) is
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Project_Data, Project_Id);
begin
if Project /= null then
Free (Project.Include_Path);
@ -891,9 +892,11 @@ package body Prj is
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
(Project_List_Element, Project_List);
Tmp : Project_List;
begin
while List /= null loop
Tmp := List.Next;
if Free_Project then
Free (List.Project, Reset_Only => Reset_Only);
end if;
@ -950,6 +953,8 @@ package body Prj is
Source_Path_Table.Free (Tree.Private_Part.Source_Paths);
Object_Path_Table.Free (Tree.Private_Part.Object_Paths);
Free (Tree.Private_Part.Ada_Path_Buffer);
-- Naming data (nothing to free ?)
null;
@ -1385,7 +1390,7 @@ package body Prj is
begin
Prj := Proj;
while Prj.Extended_By /= No_Project loop
while Prj /= null and then Prj.Extended_By /= No_Project loop
Prj := Prj.Extended_By;
end loop;

View File

@ -1459,8 +1459,10 @@ package body Rtsfind is
if Chrs = Chars (Cunit_Entity (Current_Sem_Unit)) then
declare
Parent_Name : constant Unit_Name_Type
:= Get_Parent_Spec_Name (Unit_Name (Current_Sem_Unit));
Parent_Name : constant Unit_Name_Type :=
Get_Parent_Spec_Name
(Unit_Name (Current_Sem_Unit));
begin
if Parent_Name /= No_Unit_Name then
Get_Name_String (Parent_Name);
@ -1468,9 +1470,9 @@ package body Rtsfind is
declare
P : String renames Name_Buffer (1 .. Name_Len);
begin
if P = "ada.text_io%s"
or else P = "ada.wide_text_io%s"
or else P = "ada.wide_wide_text_io%s"
if P = "ada.text_io%s" or else
P = "ada.wide_text_io%s" or else
P = "ada.wide_wide_text_io%s"
then
goto Continue;
end if;