diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-18 12:14:23 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-18 12:14:23 +0200 |
commit | 468ee96a95a470c06e0f646f0a7c83b189b7fbe6 (patch) | |
tree | d7fba811fa09b6de0a53d1fc0e6c4cf9f7fe6ca6 | |
parent | b7f17b2062c6e07c4236e16d124e9f1dcd34447f (diff) | |
download | gcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.zip gcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.tar.gz gcc-468ee96a95a470c06e0f646f0a7c83b189b7fbe6.tar.bz2 |
[multiple changes]
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
From-SVN: r165623
-rw-r--r-- | gcc/ada/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 14 | ||||
-rw-r--r-- | gcc/ada/prj.adb | 4 | ||||
-rw-r--r-- | gcc/ada/projects.texi | 8 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 15 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 5 |
6 files changed, 47 insertions, 15 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cf70909..7240bce 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 5dbf1a7..246d28a 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -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 diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb index 99886c1..6402126 100644 --- a/gcc/ada/prj.adb +++ b/gcc/ada/prj.adb @@ -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; diff --git a/gcc/ada/projects.texi b/gcc/ada/projects.texi index 979dc33..8441ec4 100644 --- a/gcc/ada/projects.texi +++ b/gcc/ada/projects.texi @@ -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 diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 3ca9798..efd44e8 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -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; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index c78d4a9..d278e1d 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -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; |