[Ada] Use Add_Char_To_Name_Buffer for 1-character strings
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 1 Dec 2021 15:58:47 +0000 (16:58 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 5 Jan 2022 11:32:37 +0000 (11:32 +0000)
gcc/ada/

* exp_dbug.adb, sem_dim.adb: Replace Add_Str_To_Name_Buffer with
Add_Char_To_Name_Buffer.

gcc/ada/exp_dbug.adb
gcc/ada/sem_dim.adb

index 19d546e..a282b8a 100644 (file)
@@ -172,7 +172,7 @@ package body Exp_Dbug is
    procedure Add_Real_To_Buffer (U : Ureal) is
    begin
       Add_Uint_To_Buffer (Norm_Num (U));
-      Add_Str_To_Name_Buffer ("_");
+      Add_Char_To_Name_Buffer ('_');
       Add_Uint_To_Buffer (Norm_Den (U));
    end Add_Real_To_Buffer;
 
@@ -671,7 +671,7 @@ package body Exp_Dbug is
          Add_Real_To_Buffer (Delta_Value (E));
 
          if Small_Value (E) /= Delta_Value (E) then
-            Add_Str_To_Name_Buffer ("_");
+            Add_Char_To_Name_Buffer ('_');
             Add_Real_To_Buffer (Small_Value (E));
          end if;
 
@@ -710,7 +710,7 @@ package body Exp_Dbug is
 
             if Lo_Encode or Hi_Encode then
                if Biased then
-                  Add_Str_To_Name_Buffer ("_");
+                  Add_Char_To_Name_Buffer ('_');
                else
                   if Lo_Encode then
                      if Hi_Encode then
@@ -1535,7 +1535,7 @@ package body Exp_Dbug is
 
                begin
                   Set_Entity_Name (Var);
-                  Add_Str_To_Name_Buffer ("L");
+                  Add_Char_To_Name_Buffer ('L');
                   Set_Chars (Var, Name_Enter);
                end;
 
@@ -1544,7 +1544,7 @@ package body Exp_Dbug is
               and then Ekind (Scope (Homonym (Ent))) = E_Block
             then
                Set_Entity_Name (Ent);
-               Add_Str_To_Name_Buffer ("B");
+               Add_Char_To_Name_Buffer ('B');
                Set_Chars (Ent, Name_Enter);
             end if;
          end if;
index a38b129..960c567 100644 (file)
@@ -2759,7 +2759,7 @@ package body Sem_Dim is
 
       --  Insert a blank between the literal and the symbol
 
-      Add_Str_To_Name_Buffer (" ");
+      Add_Char_To_Name_Buffer (' ');
       Append (Global_Name_Buffer, Symbol_Of (Typ));
 
       Error_Msg_Name_1 := Name_Find;