diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:46:03 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-14 08:46:03 +0000 |
commit | e4fed0767a1e3115257b38204231d02217d1408d (patch) | |
tree | e043ad5b7ca9b739ced688a5040d0ff234515f08 /gcc/ada/sinput-d.adb | |
parent | 5039558ddbb9adb612de258b85c399836c7910ea (diff) | |
download | gcc-e4fed0767a1e3115257b38204231d02217d1408d.tar.gz |
2007-08-14 Thomas Quinot <quinot@adacore.com>
* table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
of Set_Item.
(Set_Item): When the new item is an element of the currently allocated
table passed by reference, save a copy on the stack if we're going
to reallocate. Also, in Table.Set_Item, make sure we test the proper
variable to determine whether to call Set_Last.
* sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
symbols-vms.adb, symbols-processing-vms-alpha.adb,
symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
some occurrences of the pattern
T.Increment_Last;
T.Table (T.Last) := Value;
with a cleaner call to
T.Append (Value);
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinput-d.adb')
-rw-r--r-- | gcc/ada/sinput-d.adb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/sinput-d.adb b/gcc/ada/sinput-d.adb index d9e290a1563..9b13e55d944 100644 --- a/gcc/ada/sinput-d.adb +++ b/gcc/ada/sinput-d.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2006, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2007, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -62,14 +62,13 @@ package body Sinput.D is is begin Loc := Source_File.Table (Source_File.Last).Source_Last + 1; - Source_File.Increment_Last; + Source_File.Append (Source_File.Table (Source)); Dfile := Source_File.Last; declare S : Source_File_Record renames Source_File.Table (Dfile); begin - S := Source_File.Table (Source); S.Full_Debug_Name := Create_Debug_File (S.File_Name); S.Debug_Source_Name := Strip_Directory (S.Full_Debug_Name); S.Source_First := Loc; |