]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove conversion from String_Id to String and back to String_Id
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 22 Mar 2024 18:06:48 +0000 (19:06 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:26:45 +0000 (09:26 +0200)
Code cleanup; semantics is unaffected.

gcc/ada/

* exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove
useless conversions.

gcc/ada/exp_put_image.adb

index f5141a56626824c36ea11a12b9ec98617936a209..09fbfa75eeba59d579111abedb8e11329a42d217 100644 (file)
@@ -44,7 +44,6 @@ with Sinfo.Nodes;    use Sinfo.Nodes;
 with Sinfo.Utils;    use Sinfo.Utils;
 with Snames;         use Snames;
 with Stand;
-with Stringt;        use Stringt;
 with Tbuild;         use Tbuild;
 with Ttypes;         use Ttypes;
 with Uintp;          use Uintp;
@@ -832,9 +831,8 @@ package body Exp_Put_Image is
                 Parameter_Associations => New_List
                   (Make_Identifier (Loc, Name_S),
                    Make_String_Literal (Loc,
-                     To_String
-                       (Fully_Qualified_Name_String
-                          (Btyp, Append_NUL => False))))));
+                     Fully_Qualified_Name_String
+                       (Btyp, Append_NUL => False)))));
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then