diff mbox series

[Ada] Rename "optional" node subtypes that allow Empty

Message ID 20210921152634.GA3094966@adacore.com
State New
Headers show
Series [Ada] Rename "optional" node subtypes that allow Empty | expand

Commit Message

Pierre-Marie de Rodat Sept. 21, 2021, 3:26 p.m. UTC
This patch renames the new Opt_... subtypes in Sinfo.Nodes and
Einfo.Entities to end with the suffix "_Id" for homogeneity with other
subtypes of Node_Id and Entity_Id.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* gen_il-gen.adb (Put_Opt_Subtype): Add suffix.
diff mbox series

Patch

diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -1503,7 +1503,7 @@  package body Gen_IL.Gen is
          procedure Put_Opt_Subtype (T : Node_Or_Entity_Type) is
          begin
             if Type_Table (T).Parent /= No_Type then
-               Put (S, "subtype Opt_" & Image (T) & " is" & LF);
+               Put (S, "subtype Opt_" & Id_Image (T) & " is" & LF);
                Increase_Indent (S, 2);
                Put (S, Id_Image (Root));
 
@@ -1513,8 +1513,8 @@  package body Gen_IL.Gen is
                if Enable_Assertions then
                   Put (S, " with Predicate =>" & LF);
                   Increase_Indent (S, 2);
-                  Put (S, "Opt_" & Image (T) & " = Empty or else" & LF);
-                  Put (S, "Opt_" & Image (T) & " in " & Id_Image (T));
+                  Put (S, "Opt_" & Id_Image (T) & " = Empty or else" & LF);
+                  Put (S, "Opt_" & Id_Image (T) & " in " & Id_Image (T));
                   Decrease_Indent (S, 2);
                end if;