prj.adb, [...]: Add comment, minor code clean ups.
authorRobert Dewar <dewar@adacore.com>
Fri, 24 Jan 2014 14:53:30 +0000 (14:53 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 24 Jan 2014 14:53:30 +0000 (15:53 +0100)
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

gcc/ada/ChangeLog
gcc/ada/back_end.adb
gcc/ada/prj-env.adb
gcc/ada/prj.adb

index af31feaf69812ab36ee4d5ca806934920cb1209b..41a0ed0ec60d82d24de798bdafc36723b1dfb8fa 100644 (file)
@@ -1,3 +1,7 @@
+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
index 59f7bb40065c4ecf4d69bacaf71caf89d97e7bb7..6c3e9a80e0cf6b3b2bbe10e17b6d94b9b7733c9d 100644 (file)
@@ -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);
 
index e6c23469a75d0c939f94f2e44a02e58e14697df4..b3a5d7993c66c7e29a7d2cd14b4dc4ead90021c7 100644 (file)
@@ -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;
index 5768e1afca09fe3fc64ef3704ac9c397646a85dd..e3a4c49dcacc74a740a8d4804e541ea4e2ca972b 100644 (file)
@@ -1488,8 +1488,8 @@ package body Prj is
             if Project.Object_Directory = No_Path_Information
               or else
                 (Including_Libraries
-                 and then
-                 Contains_ALI_Files (Project.Library_ALI_Dir.Display_Name))
+                  and then
+                    Contains_ALI_Files (Project.Library_ALI_Dir.Display_Name))
             then
                return Project.Library_ALI_Dir.Display_Name;
             else