diff options
-rw-r--r-- | gcc/ada/namet.adb | 6 | ||||
-rw-r--r-- | gcc/ada/namet.ads | 4 | ||||
-rw-r--r-- | gcc/ada/treepr.adb | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb index 7eb2f0e..50dc783 100644 --- a/gcc/ada/namet.adb +++ b/gcc/ada/namet.adb @@ -1570,9 +1570,11 @@ package body Namet is -- Write_Name_For_Debug -- -------------------------- - procedure Write_Name_For_Debug (Id : Name_Id) is + procedure Write_Name_For_Debug (Id : Name_Id; Quote : String := "") is begin if Is_Valid_Name (Id) then + Write_Str (Quote); + declare Buf : Bounded_String (Max_Length => Natural (Length_Of_Name (Id))); begin @@ -1580,6 +1582,8 @@ package body Namet is Write_Str (Buf.Chars (1 .. Buf.Length)); end; + Write_Str (Quote); + elsif Id = No_Name then Write_Str ("<No_Name>"); diff --git a/gcc/ada/namet.ads b/gcc/ada/namet.ads index 5342e5d..11c88ef 100644 --- a/gcc/ada/namet.ads +++ b/gcc/ada/namet.ads @@ -433,9 +433,9 @@ package Namet is -- Like Write_Name, except that the name written is the decoded name, as -- described for Append_Decoded. - procedure Write_Name_For_Debug (Id : Name_Id); + procedure Write_Name_For_Debug (Id : Name_Id; Quote : String := ""); -- Like Write_Name, except it tries to be robust in the presence of invalid - -- data. + -- data, and valid names are surrounded by Quote. function Name_Entries_Count return Nat; -- Return current number of entries in the names table diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb index dda500d..4fd082a 100644 --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -1142,7 +1142,7 @@ package body Treepr is procedure Print_Name (N : Name_Id) is begin if Phase = Printing then - Write_Name_For_Debug (N); + Write_Name_For_Debug (N, Quote => """"); end if; end Print_Name; |