diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-06 14:16:32 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-06 14:16:32 +0200 |
commit | 315f0c424be6ad994f0253bd09d30c53cf47af8a (patch) | |
tree | 2269c6989b4176b686f4275fc8b058484766a119 /gcc/ada/sinput.adb | |
parent | 5efb89d0e1a8aa19fafd64e7c7bebde46cccdd14 (diff) | |
download | gcc-315f0c424be6ad994f0253bd09d30c53cf47af8a.zip gcc-315f0c424be6ad994f0253bd09d30c53cf47af8a.tar.gz gcc-315f0c424be6ad994f0253bd09d30c53cf47af8a.tar.bz2 |
[multiple changes]
2017-09-06 Bob Duff <duff@adacore.com>
* exp_util.adb (Is_Displace_Call): Make sure it works for indirect
calls and the like.
2017-09-06 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
declarations to only consider valid uses of Global/Depends those on
single concurrent objects.
2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Check_Record_Representation_Clause): Give an
error as soon as one of the specified components overlaps the
parent field.
2017-09-06 Arnaud Charlet <charlet@adacore.com>
* sem_prag.ads: minor fix typo in comment.
2017-09-06 Justin Squirek <squirek@adacore.com>
* sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
from source before checking source references.
* sem_warn.adb (Check_References): Add check for internal block
before recursing.
2017-09-06 Vincent Celier <celier@adacore.com>
* make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
gnatname.adb: Remove the Project Manager from the GNAT tools.
2017-09-06 Bob Duff <duff@adacore.com>
* sem_util.ads: Minor comment fix.
2017-09-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations, case of Formal_Package):
Generate a freeze node for the actual of a formal package, if
the actual is declared in the same unit and has a corresponding
body, to prevent the current instance from being frozen before
the actual is.
From-SVN: r251786
Diffstat (limited to 'gcc/ada/sinput.adb')
-rw-r--r-- | gcc/ada/sinput.adb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb index bab55c1..b13da9d 100644 --- a/gcc/ada/sinput.adb +++ b/gcc/ada/sinput.adb @@ -320,6 +320,38 @@ package body Sinput is end case; end Check_For_BOM; + ----------------------------- + -- Clear_Source_File_Table -- + ----------------------------- + + procedure Free is new Unchecked_Deallocation + (Lines_Table_Type, Lines_Table_Ptr); + + procedure Free is new Unchecked_Deallocation + (Logical_Lines_Table_Type, Logical_Lines_Table_Ptr); + + procedure Clear_Source_File_Table is + begin + for X in 1 .. Source_File.Last loop + declare + S : Source_File_Record renames Source_File.Table (X); + begin + if S.Instance = No_Instance_Id then + Free_Source_Buffer (S.Source_Text); + else + Free_Dope (S.Source_Text'Address); + S.Source_Text := null; + end if; + + Free (S.Lines_Table); + Free (S.Logical_Lines_Table); + end; + end loop; + + Source_File.Free; + Sinput.Initialize; + end Clear_Source_File_Table; + --------------------------------- -- Comes_From_Inherited_Pragma -- --------------------------------- |