aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput-d.adb
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2007-08-14 10:46:03 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:46:03 +0200
commit1d6f10a19473c4c174bcb8295163be080ae6f64e (patch)
treee043ad5b7ca9b739ced688a5040d0ff234515f08 /gcc/ada/sinput-d.adb
parentf97ccb3a84b27374661fd1f9540efb360d976019 (diff)
downloadgcc-1d6f10a19473c4c174bcb8295163be080ae6f64e.zip
gcc-1d6f10a19473c4c174bcb8295163be080ae6f64e.tar.gz
gcc-1d6f10a19473c4c174bcb8295163be080ae6f64e.tar.bz2
table.adb, [...] (Append): Reimplement in terms of Set_Item.
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); From-SVN: r127442
Diffstat (limited to 'gcc/ada/sinput-d.adb')
-rw-r--r--gcc/ada/sinput-d.adb5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/sinput-d.adb b/gcc/ada/sinput-d.adb
index d9e290a..9b13e55 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;