[Ada] Use Cancel_Special_Output instead of Set_Special_Output with null
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 14 Nov 2018 11:40:20 +0000 (11:40 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Nov 2018 11:40:20 +0000 (11:40 +0000)
I believe Cancel_Special_Output is easier to read and thus preferred;
otherwise, it wouldn't be introduced, so let's use it where possible.

2018-11-14  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* bindgen.adb, exp_cg.adb, repinfo.adb, sprint.adb: Minor reuse
Cancel_Special_Output where possible.

From-SVN: r266110

gcc/ada/ChangeLog
gcc/ada/bindgen.adb
gcc/ada/exp_cg.adb
gcc/ada/repinfo.adb
gcc/ada/sprint.adb

index d760f805f88977d08621ec5e7642c9acff2a3545..26ffdfc9394cd8803903f35dfdb9d59b24b04f9f 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-14  Piotr Trojanek  <trojanek@adacore.com>
+
+       * bindgen.adb, exp_cg.adb, repinfo.adb, sprint.adb: Minor reuse
+       Cancel_Special_Output where possible.
+
 2018-11-14  Piotr Trojanek  <trojanek@adacore.com>
 
        * exp_dbug.ads, sem_util.ads: Minor fixes in comments.
index 4b4e2bb77b80d9c3997343b908348d9165a3ed1e..27227a6579d2fc20f1b90e91433ab1baa5df468e 100644 (file)
@@ -1186,7 +1186,7 @@ package body Bindgen is
       end loop;
       WBI ("     & ASCII.NUL;");
 
-      Set_Special_Output (null);
+      Cancel_Special_Output;
 
       Bind_Env_String_Built := True;
    end Gen_Bind_Env_String;
index f40dc7e9c2a7b33be97024479345564d73bcb549..0c6e08b02e5c962d447ff81842f474978dff666e 100644 (file)
@@ -146,7 +146,7 @@ package body Exp_CG is
          end if;
       end loop;
 
-      Set_Special_Output (null);
+      Cancel_Special_Output;
    end Generate_CG_Output;
 
    ----------------
index e75bb1d5d690e8283e616ad3c124a5f0d77e557e..2a0d568777b241daa121874174607944ebb27997 100644 (file)
@@ -1756,7 +1756,7 @@ package body Repinfo is
                     (Get_Name_String (File_Name (Source_Index (U))));
                   Set_Special_Output (Write_Info_Line'Access);
                   List_Entities (Cunit_Entity (U), Bytes_Big_Endian);
-                  Set_Special_Output (null);
+                  Cancel_Special_Output;
                   Close_Repinfo_File_Access.all;
                end if;
             end if;
index ab7eecb7257e4e1870b5e01c0e3ae1dd64c7794b..a1dbb3cabfcfa2b33d4150e409d0e67d0035182f 100644 (file)
@@ -660,7 +660,7 @@ package body Sprint is
                   Write_Source_Lines (Last_Source_Line (Current_Source_File));
                   Write_Eol;
                   Close_Debug_Source;
-                  Set_Special_Output (null);
+                  Cancel_Special_Output;
 
                --  Normal output to standard output file