From 1d6f10a19473c4c174bcb8295163be080ae6f64e Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Tue, 14 Aug 2007 10:46:03 +0200 Subject: table.adb, [...] (Append): Reimplement in terms of Set_Item. 2007-08-14 Thomas Quinot * 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 --- gcc/ada/switch-m.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/ada/switch-m.adb') diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb index 7c7259d..ded1a94 100644 --- a/gcc/ada/switch-m.adb +++ b/gcc/ada/switch-m.adb @@ -119,9 +119,7 @@ package body Switch.M is -- Add a new component in the table. Switches (Last) := new String'(S); - Normalized_Switches.Increment_Last; - Normalized_Switches.Table (Normalized_Switches.Last) := - Switches (Last); + Normalized_Switches.Append (Switches (Last)); end Add_Switch_Component; -- Start of processing for Normalize_Compiler_Switches -- cgit v1.1