diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 13:27:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 13:27:47 +0000 |
commit | 86dfefaba94042be33c3ad5c06c13af0ec055d9e (patch) | |
tree | aadcfaffb243a9d9f6f05b2277180fd10c5f47fe /gcc/ada/prj.ads | |
parent | 2d7c41aa053be488ff0a6f5b40249351ba04fbba (diff) | |
download | gcc-86dfefaba94042be33c3ad5c06c13af0ec055d9e.tar.gz |
2010-10-12 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Add_Source): Put source in hash table Source_Files_HT
(Process_Exceptions_File_Based): Use hash table Source_Files_HT, instead
of iterating through all sources of the project.
* prj.adb (Free): Reset hash table Source_Files_HT
(Reset): Reset hash table Source_Files_HT
* prj.ads (Source_Data): New component Next_With_File_Name
(Source_Files_Htable): New hash table
(Project_Tree_Data): New component Source_Files_HT
2010-10-12 Tristan Gingold <gingold@adacore.com>
* g-trasym-vms-ia64.adb: Use the documented API.
* gcc-interface/Makefile.in: Always set NO_REORDER_ADAFLAGS.
* gcc-interface/Make-lang.in: Update dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165377 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj.ads')
-rw-r--r-- | gcc/ada/prj.ads | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads index 84c825ff661..7039a81c347 100644 --- a/gcc/ada/prj.ads +++ b/gcc/ada/prj.ads @@ -770,6 +770,10 @@ package Prj is Next_In_Lang : Source_Id := No_Source; -- Link to another source of the same language in the same project + + Next_With_File_Name : Source_Id := No_Source; + -- Link to another source with the same base file name + end record; No_Source_Data : constant Source_Data := @@ -803,7 +807,17 @@ package Prj is Switches_TS => Empty_Time_Stamp, Naming_Exception => False, Duplicate_Unit => False, - Next_In_Lang => No_Source); + Next_In_Lang => No_Source, + Next_With_File_Name => No_Source); + + package Source_Files_Htable is new Simple_HTable + (Header_Num => Header_Num, + Element => Source_Id, + No_Element => No_Source, + Key => File_Name_Type, + Hash => Hash, + Equal => "="); + -- Mapping of source file names to source ids package Source_Paths_Htable is new Simple_HTable (Header_Num => Header_Num, @@ -1367,7 +1381,10 @@ package Prj is -- The number of entries in Replaced_Sources Units_HT : Units_Htable.Instance; - -- Unit name to Unit_Index (and from there so Source_Id) + -- Unit name to Unit_Index (and from there to Source_Id) + + Source_Files_HT : Source_Files_Htable.Instance; + -- Base source file names to Source_Id list. Source_Paths_HT : Source_Paths_Htable.Instance; -- Full path to Source_Id |