From 6a1cb33a404025cb4d97876dd47e55c6800c6942 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Thu, 13 Dec 2007 11:23:29 +0100 Subject: clean.adb (Usage): Add line for -aP 2007-12-06 Bob Duff * clean.adb (Usage): Add line for -aP (Check_Version_And_Help): Change Check_Version_And_Help to be generic, with a parameter "procedure Usage", instead of passing a pointer to a procedure. This is to eliminate trampolines (since the Usage procedure is often nested in a main procedure, and it would be inconvenient to unnest it). * g-comlin.adb (For_Each_Simple_Switch): Change For_Each_Simple_Switch to be generic, with a parameter "procedure Callback (...)", instead of passing a pointer to a procedure. This is to eliminate trampolines (since the Callback procedure is usually nested). * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb (Check_Version_And_Help): Change Check_Version_And_Help to be generic. * g-pehage.adb (Compute_Edges_And_Vertices, Build_Identical_Key_Sets): Use the generic Heap_Sort_G instead of Heap_Sort_A. From-SVN: r130824 --- gcc/ada/switch.adb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gcc/ada/switch.adb') diff --git a/gcc/ada/switch.adb b/gcc/ada/switch.adb index 93527a3..bf32e64 100644 --- a/gcc/ada/switch.adb +++ b/gcc/ada/switch.adb @@ -42,14 +42,13 @@ package body Switch is Osint.Fail ("invalid switch: ", Switch); end Bad_Switch; - ---------------------------- - -- Check_Version_And_Help -- - ---------------------------- + ------------------------------ + -- Check_Version_And_Help_G -- + ------------------------------ - procedure Check_Version_And_Help + procedure Check_Version_And_Help_G (Tool_Name : String; Initial_Year : String; - Usage : Procedure_Ptr; Version_String : String := Gnatvsn.Gnat_Version_String) is Version_Switch_Present : Boolean := False; @@ -92,12 +91,12 @@ package body Switch is if Help_Switch_Present then Set_Standard_Output; - Usage.all; + Usage; Write_Eol; Write_Line ("Report bugs to report@adacore.com"); Exit_Program (E_Success); end if; - end Check_Version_And_Help; + end Check_Version_And_Help_G; --------------------- -- Display_Version -- -- cgit v1.1