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>
* sem_ch3.adb (Analyze_Declarations): At the end of an
......
......@@ -268,6 +268,8 @@ package body Back_End is
Opt.Stack_Checking_Enabled := (flag_stack_check /= 0);
-- 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);
......
......@@ -40,7 +40,7 @@ with GNAT.Directory_Operations; use GNAT.Directory_Operations;
package body Prj.Env is
Buffer_Initial : constant := 1_000;
-- Initial size of Buffer
-- Initial arbitrary size of buffers
Uninitialized_Prefix : constant String := '#' & Path_Separator;
-- Prefix to indicate that the project path has not been initialized yet.
......@@ -151,7 +151,7 @@ package body Prj.Env is
-- this project, compute the source path
if Project.Ada_Include_Path = null then
Buffer := new String (1 .. 4096);
Buffer := new String (1 .. Buffer_Initial);
For_All_Projects
(Project, In_Tree, Dummy, Include_Aggregated => True);
Project.Ada_Include_Path := new String'(Buffer (1 .. Buffer_Last));
......@@ -161,7 +161,7 @@ package body Prj.Env is
return Project.Ada_Include_Path.all;
else
Buffer := new String (1 .. 4096);
Buffer := new String (1 .. Buffer_Initial);
Add_To_Path
(Project.Source_Dirs, In_Tree.Shared, Buffer, Buffer_Last);
......@@ -236,14 +236,13 @@ package body Prj.Env is
return Project.Ada_Objects_Path_No_Libs;
else
Buffer := new String (1 .. 4096);
Buffer := new String (1 .. Buffer_Initial);
For_All_Projects (Project, In_Tree, Dummy);
Result := new String'(Buffer (1 .. Buffer_Last));
Free (Buffer);
if Including_Libraries then
Project.Ada_Objects_Path := Result;
else
Project.Ada_Objects_Path_No_Libs := Result;
end if;
......
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