Commit 8edc33fa by Robert Dewar Committed by Arnaud Charlet

prj.adb, [...]: Add comment, minor code clean ups.

2014-01-24  Robert Dewar  <dewar@adacore.com>

	* prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.

From-SVN: r207040
parent ad4e3362
2014-01-24 Robert Dewar <dewar@adacore.com>
* prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
2014-01-24 Ed Schonberg <schonberg@adacore.com> 2014-01-24 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Declarations): At the end of an * sem_ch3.adb (Analyze_Declarations): At the end of an
......
...@@ -268,6 +268,8 @@ package body Back_End is ...@@ -268,6 +268,8 @@ package body Back_End is
Opt.Stack_Checking_Enabled := (flag_stack_check /= 0); Opt.Stack_Checking_Enabled := (flag_stack_check /= 0);
-- Acquire short enums flag directly from GCC -- Acquire short enums flag directly from GCC
-- This needs documentation in the spec ???
-- So does the one above! ???
Targparm.Short_Enums_On_Target := (flag_short_enums /= 0); Targparm.Short_Enums_On_Target := (flag_short_enums /= 0);
......
...@@ -40,7 +40,7 @@ with GNAT.Directory_Operations; use GNAT.Directory_Operations; ...@@ -40,7 +40,7 @@ with GNAT.Directory_Operations; use GNAT.Directory_Operations;
package body Prj.Env is package body Prj.Env is
Buffer_Initial : constant := 1_000; Buffer_Initial : constant := 1_000;
-- Initial size of Buffer -- Initial arbitrary size of buffers
Uninitialized_Prefix : constant String := '#' & Path_Separator; Uninitialized_Prefix : constant String := '#' & Path_Separator;
-- Prefix to indicate that the project path has not been initialized yet. -- Prefix to indicate that the project path has not been initialized yet.
...@@ -151,7 +151,7 @@ package body Prj.Env is ...@@ -151,7 +151,7 @@ package body Prj.Env is
-- this project, compute the source path -- this project, compute the source path
if Project.Ada_Include_Path = null then if Project.Ada_Include_Path = null then
Buffer := new String (1 .. 4096); Buffer := new String (1 .. Buffer_Initial);
For_All_Projects For_All_Projects
(Project, In_Tree, Dummy, Include_Aggregated => True); (Project, In_Tree, Dummy, Include_Aggregated => True);
Project.Ada_Include_Path := new String'(Buffer (1 .. Buffer_Last)); Project.Ada_Include_Path := new String'(Buffer (1 .. Buffer_Last));
...@@ -161,7 +161,7 @@ package body Prj.Env is ...@@ -161,7 +161,7 @@ package body Prj.Env is
return Project.Ada_Include_Path.all; return Project.Ada_Include_Path.all;
else else
Buffer := new String (1 .. 4096); Buffer := new String (1 .. Buffer_Initial);
Add_To_Path Add_To_Path
(Project.Source_Dirs, In_Tree.Shared, Buffer, Buffer_Last); (Project.Source_Dirs, In_Tree.Shared, Buffer, Buffer_Last);
...@@ -236,14 +236,13 @@ package body Prj.Env is ...@@ -236,14 +236,13 @@ package body Prj.Env is
return Project.Ada_Objects_Path_No_Libs; return Project.Ada_Objects_Path_No_Libs;
else else
Buffer := new String (1 .. 4096); Buffer := new String (1 .. Buffer_Initial);
For_All_Projects (Project, In_Tree, Dummy); For_All_Projects (Project, In_Tree, Dummy);
Result := new String'(Buffer (1 .. Buffer_Last)); Result := new String'(Buffer (1 .. Buffer_Last));
Free (Buffer); Free (Buffer);
if Including_Libraries then if Including_Libraries then
Project.Ada_Objects_Path := Result; Project.Ada_Objects_Path := Result;
else else
Project.Ada_Objects_Path_No_Libs := Result; Project.Ada_Objects_Path_No_Libs := Result;
end if; end if;
......
...@@ -1488,8 +1488,8 @@ package body Prj is ...@@ -1488,8 +1488,8 @@ package body Prj is
if Project.Object_Directory = No_Path_Information if Project.Object_Directory = No_Path_Information
or else or else
(Including_Libraries (Including_Libraries
and then and then
Contains_ALI_Files (Project.Library_ALI_Dir.Display_Name)) Contains_ALI_Files (Project.Library_ALI_Dir.Display_Name))
then then
return Project.Library_ALI_Dir.Display_Name; return Project.Library_ALI_Dir.Display_Name;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment