diff options
author | Arnaud Charlet <charlet@adacore.com> | 2022-07-18 07:11:42 +0000 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-05 09:21:01 +0200 |
commit | 2322afe68dcee22842e6feb60aed262c584ec48a (patch) | |
tree | 95f63532bf9e9302022ea648ec54a6727627ee94 /gcc | |
parent | ae035e3437c1ec7d96773b31e631ec121bb4153f (diff) | |
download | gcc-2322afe68dcee22842e6feb60aed262c584ec48a.zip gcc-2322afe68dcee22842e6feb60aed262c584ec48a.tar.gz gcc-2322afe68dcee22842e6feb60aed262c584ec48a.tar.bz2 |
[Ada] Code cleanups
gcc/ada/
* treepr.adb: Remove local To_Lower and use the procedure
version instead.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/treepr.adb | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb index 32f6e81..a9f4088 100644 --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -135,10 +135,6 @@ package body Treepr is function From_Union is new Ada.Unchecked_Conversion (Union_Id, Uint); function From_Union is new Ada.Unchecked_Conversion (Union_Id, Ureal); - function To_Mixed (S : String) return String; - -- Turns an identifier into Mixed_Case. For bootstrap reasons, we cannot - -- use To_Mixed function from System.Case_Util. - function Image (F : Node_Or_Entity_Field) return String; procedure Print_Init; @@ -371,8 +367,9 @@ package body Treepr is when others => declare - Result : constant String := To_Mixed (F'Img); + Result : String := F'Img; begin + To_Mixed (Result); return Result (3 .. Result'Last); -- Remove "F_" end; end case; @@ -1671,8 +1668,10 @@ package body Treepr is -------------------------- procedure Print_Str_Mixed_Case (S : String) is + Tmp : String := S; begin - Print_Str (To_Mixed (S)); + To_Mixed (Tmp); + Print_Str (Tmp); end Print_Str_Mixed_Case; ---------------- @@ -1806,17 +1805,6 @@ package body Treepr is Next_Serial_Number := Next_Serial_Number + 1; end Set_Serial_Number; - -------------- - -- To_Mixed -- - -------------- - - function To_Mixed (S : String) return String is - begin - return Result : String (S'Range) := S do - To_Mixed (Result); - end return; - end To_Mixed; - --------------- -- Tree_Dump -- --------------- |