diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 15:24:03 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 15:24:03 +0000 |
commit | bbc7bed2e0ba2c1533a3263f4b7057b0b03c6fa3 (patch) | |
tree | 2f26229f8bb14959089bd4e16133eda60ff5d845 /gcc/ada/gnatbind.adb | |
parent | f9dae3bb12b41e75b1522f42b6a7c0bb9d51316c (diff) | |
download | gcc-bbc7bed2e0ba2c1533a3263f4b7057b0b03c6fa3.tar.gz |
2010-06-21 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Conditional_Expression): Fold if condition
known at compile time.
2010-06-21 Gary Dismukes <dismukes@adacore.com>
* atree.adb: Fix comment typo.
2010-06-21 Ed Schonberg <schonberg@adacore.com>
* sem_eval.adb (Test_Ambiguous_Operator): New procedure to check
whether a universal arithmetic expression in a conversion, which is
rewritten from a function call with an expanded name, is ambiguous.
2010-06-21 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Name_Location): New Boolean component Listed, to record
source files in specified list of sources.
(Check_Package_Naming): Remove out parameters Bodies and Specs, as they
are never used.
(Add_Source): Set the Location of the new source
(Process_Exceptions_File_Based): Call Add_Source with the Location
(Get_Sources_From_File): If an exception is found, set its Listed to
True
(Find_Sources): When Source_Files is specified, if an exception is
found, set its Listed to True. Remove any exception that is not in a
specified list of sources.
* prj.ads (Source_Data): New component Location
2010-06-21 Vincent Celier <celier@adacore.com>
* gnatbind.adb (Closure_Sources): Global table, moved from block.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r-- | gcc/ada/gnatbind.adb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb index 8b6edbd3aab..cc06ce39706 100644 --- a/gcc/ada/gnatbind.adb +++ b/gcc/ada/gnatbind.adb @@ -82,6 +82,16 @@ procedure Gnatbind is Mapping_File : String_Ptr := null; + package Closure_Sources is new Table.Table + (Table_Component_Type => File_Name_Type, + Table_Index_Type => Natural, + Table_Low_Bound => 1, + Table_Initial => 10, + Table_Increment => 100, + Table_Name => "Gnatbind.Closure_Sources"); + -- Table to record the sources in the closure, to avoid duplications. Used + -- only with switch -R. + function Gnatbind_Supports_Auto_Init return Boolean; -- Indicates if automatic initialization of elaboration procedure -- through the constructor mechanism is possible on the platform. @@ -817,16 +827,6 @@ begin if List_Closure then declare - package Sources is new Table.Table - (Table_Component_Type => File_Name_Type, - Table_Index_Type => Natural, - Table_Low_Bound => 1, - Table_Initial => 10, - Table_Increment => 100, - Table_Name => "Gnatbind.Sources"); - -- Table to record the sources in the closure, to avoid - -- dupications. - Source : File_Name_Type; function Put_In_Sources (S : File_Name_Type) return Boolean; @@ -842,17 +842,19 @@ begin return Boolean is begin - for J in 1 .. Sources.Last loop - if Sources.Table (J) = S then + for J in 1 .. Closure_Sources.Last loop + if Closure_Sources.Table (J) = S then return False; end if; end loop; - Sources.Append (S); + Closure_Sources.Append (S); return True; end Put_In_Sources; begin + Closure_Sources.Init; + if not Zero_Formatting then Write_Eol; Write_Str ("REFERENCED SOURCES"); |