2010-10-18 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 2010 10:14:23 +0000 (10:14 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 2010 10:14:23 +0000 (10:14 +0000)
* prj-nmsc.adb, prj.adb, sem_res.adb: Minor reformatting.

2010-10-18  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Insert_Explicit_Dereference): If operand is a selected
component, we generate a reference to the ultimate prefix when it is an
entity name. We must place the reference on the identifier for that
prefix, and not on the operand itself, to prevent spurious extra
references in the ali file.

2010-10-18  Vincent Celier  <celier@adacore.com>

* projects.texi: Add documentation for attribute Ignore_Source_Sub_Dirs

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165623 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/prj-nmsc.adb
gcc/ada/prj.adb
gcc/ada/projects.texi
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb

index cf70909..7240bce 100644 (file)
@@ -1,3 +1,19 @@
+2010-10-18  Robert Dewar  <dewar@adacore.com>
+
+       * prj-nmsc.adb, prj.adb, sem_res.adb: Minor reformatting.
+
+2010-10-18  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_util.adb (Insert_Explicit_Dereference): If operand is a selected
+       component, we generate a reference to the ultimate prefix when it is an
+       entity name. We must place the reference on the identifier for that
+       prefix, and not on the operand itself, to prevent spurious extra
+       references in the ali file.
+
+2010-10-18  Vincent Celier  <celier@adacore.com>
+
+       * projects.texi: Add documentation for attribute Ignore_Source_Sub_Dirs
+
 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
 
        * einfo.ads, einfo.adb: New attribute PPC_Wrapper for entries and entry
index 5dbf1a7..246d28a 100644 (file)
@@ -6896,20 +6896,20 @@ package body Prj.Nmsc is
                      if Ignore /= Nil_String then
                         declare
                            Dir_Name : String := Name (1 .. Last);
-                           List : String_List_Id := Ignore;
+                           List     : String_List_Id := Ignore;
+
                         begin
                            Canonical_Case_File_Name (Dir_Name);
 
                            while List /= Nil_String loop
                               Get_Name_String
-                                (Data.Tree.String_Elements.Table
-                                   (List).Value);
+                                (Data.Tree.String_Elements.Table (List).Value);
                               Canonical_Case_File_Name
                                 (Name_Buffer (1 .. Name_Len));
                               OK := Name_Buffer (1 .. Name_Len) /= Dir_Name;
                               exit when not OK;
-                              List := Data.Tree.String_Elements.Table
-                                                                 (List).Next;
+                              List :=
+                                Data.Tree.String_Elements.Table (List).Next;
                            end loop;
                         end;
                      end if;
@@ -7650,6 +7650,10 @@ package body Prj.Nmsc is
                  (Get_Name_String (Src.Path_Name)));
             Id.File := Name_Find;
 
+            Id.Next_With_File_Name :=
+              Source_Files_Htable.Get (Data.Tree.Source_Files_HT, Id.File);
+            Source_Files_Htable.Set (Data.Tree.Source_Files_HT, Id.File, Id);
+
             Name_Len := 0;
             Add_Str_To_Name_Buffer
               (Ada.Directories.Simple_Name
index 99886c1..6402126 100644 (file)
@@ -1161,8 +1161,7 @@ package body Prj is
                 Length_Of_Name (Source.Language.Config.Compiler_Driver) /= 0
               and then not Source.Locally_Removed
               and then (Source.Language.Config.Kind /= File_Based
-                        or else
-                          Source.Kind /= Spec)
+                         or else Source.Kind /= Spec)
             then
                --  Do not modify Source.Compilable before the source record
                --  has been initilaized.
@@ -1172,6 +1171,7 @@ package body Prj is
                end if;
 
                return True;
+
             else
                if Source.Source_TS /= Empty_Time_Stamp then
                   Source.Compilable := No;
index 979dc33..8441ec4 100644 (file)
@@ -278,6 +278,14 @@ There are several ways of defining source directories:
   be excluded. It is also possible to exclude a complete directory subtree
   using the "/**" notation.
 
+@cindex @code{Ignore_Source_Sub_Dirs}
+  It is often desirable to remove, from the source directories, directory
+  subtrees rooted at some subdirectories. An example is the subdirectories
+  created by a Version Control System such as Subversion that creates directory
+  subtrees .svn/**. To do that, attribute  @b{Ignore_Source_Sub_Dirs} can be
+  used. It specifies the list of simple file names for the root of these
+  undesirable directory subtrees.
+
 @end itemize
 
 @noindent
index 3ca9798..efd44e8 100644 (file)
@@ -6331,19 +6331,20 @@ package body Sem_Res is
         and then Present (PPC_Wrapper (Nam))
         and then Current_Scope /= PPC_Wrapper (Nam)
       then
-
-         --  Rewrite as call to the precondition wrapper, adding the
-         --  task object to the list of actuals.
+         --  Rewrite as call to the precondition wrapper, adding the task
+         --  object to the list of actuals.
 
          declare
-            New_Call : Node_Id;
+            New_Call    : Node_Id;
             New_Actuals : List_Id;
          begin
             New_Actuals := New_List (Obj);
             Append_List (Parameter_Associations (N), New_Actuals);
-            New_Call := Make_Procedure_Call_Statement (Loc,
-              Name => New_Occurrence_Of (PPC_Wrapper (Nam), Loc),
-              Parameter_Associations => New_Actuals);
+            New_Call :=
+              Make_Procedure_Call_Statement (Loc,
+                Name                   =>
+                  New_Occurrence_Of (PPC_Wrapper (Nam), Loc),
+                Parameter_Associations => New_Actuals);
             Rewrite (N, New_Call);
             Analyze_And_Resolve (N);
             return;
index c78d4a9..d278e1d 100644 (file)
@@ -5585,6 +5585,7 @@ package body Sem_Util is
 
          if Is_Entity_Name (New_Prefix) then
             Ent := Entity (New_Prefix);
+            Pref := New_Prefix;
 
          --  For a retrieval of a subcomponent of some composite object,
          --  retrieve the ultimate entity if there is one.
@@ -5606,8 +5607,10 @@ package body Sem_Util is
             end if;
          end if;
 
+         --  Place the reference on the entity node.
+
          if Present (Ent) then
-            Generate_Reference (Ent, New_Prefix);
+            Generate_Reference (Ent, Pref);
          end if;
       end if;
    end Insert_Explicit_Dereference;