]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Tweak test for predefined units in binder
authorRonan Desplanques <desplanques@adacore.com>
Mon, 4 Nov 2024 14:24:29 +0000 (15:24 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 14 Nov 2024 13:54:31 +0000 (14:54 +0100)
The new way makes better use of the existing abstractions.

gcc/ada/ChangeLog:

* bindgen.adb (Gen_Elab_Calls): Tweak test.
(Gen_Elab_Externals): Likewise.

gcc/ada/bindgen.adb

index 57c97d966c9c55321fb030501a041217c82ebed2..ac29a463800db1f2d732c689bd7c73baa2126022 100644 (file)
@@ -24,7 +24,6 @@
 ------------------------------------------------------------------------------
 
 with Casing;   use Casing;
-with Fname;    use Fname;
 with Gnatvsn;  use Gnatvsn;
 with Hostparm;
 with Namet;    use Namet;
@@ -1539,7 +1538,7 @@ package body Bindgen is
 
             --  Nothing to do if predefined unit in no run time mode
 
-            if No_Run_Time_Mode and then Is_Predefined_File_Name (U.Sfile) then
+            if No_Run_Time_Mode and then U.Predefined then
                null;
 
             --  Likewise if this is an interface to a stand alone library
@@ -1724,9 +1723,7 @@ package body Bindgen is
               --  Don't generate reference for predefined file in No_Run_Time
               --  mode, since we don't include the object files in this case
 
-              and then not
-                (No_Run_Time_Mode
-                  and then Is_Predefined_File_Name (U.Sfile))
+              and then not (No_Run_Time_Mode and then U.Predefined)
             then
                Get_Name_String (U.Sfile);
                Set_String ("   ");