[Ada] Minor reuse Is_Protected_Component
[gcc.git] / gcc / ada / sinput-d.adb
index c9c128b8bbfdfa0199ba21fc4bfdd277b1f55101..5f449c76857f4cde5ef7a6309c46412981075e2e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2002-2017, Free Software Foundation, Inc.         --
+--          Copyright (C) 2002-2020, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 --                                                                          --
 ------------------------------------------------------------------------------
 
-with Debug;   use Debug;
-with Osint;   use Osint;
-with Osint.C; use Osint.C;
-with Output;  use Output;
+with Debug;         use Debug;
+with Osint;         use Osint;
+with Osint.C;       use Osint.C;
+with Output;        use Output;
+with System.OS_Lib; use System.OS_Lib;
 
 package body Sinput.D is
 
@@ -38,6 +39,7 @@ package body Sinput.D is
    ------------------------
 
    procedure Close_Debug_Source is
+      FD   : File_Descriptor;
       SFR  : Source_File_Record renames Source_File.Table (Dfile);
       Src  : Source_Buffer_Ptr;
    begin
@@ -48,7 +50,7 @@ package body Sinput.D is
       --  subsequent access.
 
       Read_Source_File
-        (SFR.Full_Debug_Name, SFR.Source_First, SFR.Source_Last, Src);
+        (SFR.Full_Debug_Name, SFR.Source_First, SFR.Source_Last, Src, FD);
       SFR.Source_Text := Src;
       pragma Assert (SFR.Source_Text'First = SFR.Source_First);
       pragma Assert (SFR.Source_Text'Last = SFR.Source_Last);