From dae4faf2e17c5c51954dd6f7e29229780371750c Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Thu, 16 Apr 2009 10:31:23 +0000 Subject: exp_dist.adb (Build_From_Any_Call): For a subtype that is a generic actual type... 2009-04-16 Thomas Quinot * exp_dist.adb (Build_From_Any_Call): For a subtype that is a generic actual type, use the base type to build the To_Any function. (Build_From_Any_Function): Remove junk, useless subtype conversion. 2009-04-16 Thomas Quinot * exp_ch9.adb, exp_code.adb, tbuild.adb, sem_case.adb, restrict.adb: Minor code reorganization (use Add_{Char,Str}_To_Name_Buffer instead of inlining it by hand). From-SVN: r146166 --- gcc/ada/sem_case.adb | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'gcc/ada/sem_case.adb') diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 7afd0d3f718..5de995d984b 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -313,26 +313,11 @@ package body Sem_Case is -- the pos value passed as an argument to Choice_Image. Get_Name_String (Chars (First_Subtype (Ctype))); - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := '''; - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := 'v'; - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := 'a'; - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := 'l'; - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := '('; + Add_Str_To_Name_Buffer ("'val("); UI_Image (Value); - - for J in 1 .. UI_Image_Length loop - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := UI_Image_Buffer (J); - end loop; - - Name_Len := Name_Len + 1; - Name_Buffer (Name_Len) := ')'; + Add_Str_To_Name_Buffer (UI_Image_Buffer (1 .. UI_Image_Length)); + Add_Char_To_Name_Buffer (')'); return Name_Find; end Choice_Image; -- cgit v1.2.1