diff options
author | Thomas Quinot <quinot@adacore.com> | 2009-04-16 10:31:23 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 12:31:23 +0200 |
commit | dae4faf2e17c5c51954dd6f7e29229780371750c (patch) | |
tree | 0d8ff538d28b6c30c21077d81930181dcde2d797 /gcc/ada/sem_case.adb | |
parent | 2794f02243b66df4e2ecbb042e26835f8b4a2a93 (diff) | |
download | gcc-dae4faf2e17c5c51954dd6f7e29229780371750c.tar.gz |
exp_dist.adb (Build_From_Any_Call): For a subtype that is a generic actual type...
2009-04-16 Thomas Quinot <quinot@adacore.com>
* 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 <quinot@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/sem_case.adb')
-rw-r--r-- | gcc/ada/sem_case.adb | 21 |
1 files changed, 3 insertions, 18 deletions
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; |