[Ada] Reference before declaration on C392015
[gcc.git] / gcc / ada / exp_strm.ads
index 1e089ca881daf29cffd91edd49e96c239873006c..d77d756463993b6ad9d1ae53c5f93e0f467650d4 100644 (file)
@@ -6,18 +6,17 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-1999 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-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- --
--- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
--- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license.          --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
@@ -26,7 +25,8 @@
 
 --  Routines to build stream subprograms for composite types
 
-with Types; use Types;
+with Exp_Tss; use Exp_Tss;
+with Types;   use Types;
 
 package Exp_Strm is
 
@@ -42,14 +42,12 @@ package Exp_Strm is
    --  reference node.
 
    function Build_Stream_Attr_Profile
-     (Loc  : Source_Ptr;
-      Typ  : Entity_Id;
-      Nam  : Name_Id)
-      return List_Id;
+     (Loc : Source_Ptr;
+      Typ : Entity_Id;
+      Nam : TSS_Name_Type) return List_Id;
    --  Builds the parameter profile for the stream attribute identified by
-   --  the given name (which is the underscore version, e.g. Name_uWrite to
-   --  identify the Write attribute). This is used for the tagged case to
-   --  build the spec for the primitive operation.
+   --  the given name. This is used for the tagged case to build the spec
+   --  for the primitive operation.
 
    --  The following routines build procedures and functions for stream
    --  attributes applied to composite types. For each of these routines,
@@ -107,14 +105,14 @@ package Exp_Strm is
    --  the same manner as is done for 'Output.
 
    procedure Build_Record_Or_Elementary_Input_Function
-     (Loc  : Source_Ptr;
-      Typ  : Entity_Id;
-      Decl : out Node_Id;
-      Fnam : out Entity_Id);
-   --  Build function for Input attribute for record type or for an
-   --  elementary type (the latter is used only in the case where a
-   --  user defined Read routine is defined, since in other cases,
-   --  Input calls the appropriate runtime library routine directly.
+     (Loc            : Source_Ptr;
+      Typ            : Entity_Id;
+      Decl           : out Node_Id;
+      Fnam           : out Entity_Id);
+   --  Build function for Input attribute for record type or for an elementary
+   --  type (the latter is used only in the case where a user-defined Read
+   --  routine is defined, since, in other cases, Input calls the appropriate
+   --  runtime library routine directly).
 
    procedure Build_Record_Or_Elementary_Output_Procedure
      (Loc  : Source_Ptr;
@@ -140,4 +138,17 @@ package Exp_Strm is
       Pnam : out Entity_Id);
    --  Build procedure for Write attribute for record type
 
+   procedure Build_Stream_Procedure
+     (Loc  : Source_Ptr;
+      Typ  : Entity_Id;
+      Decl : out Node_Id;
+      Pnam : Entity_Id;
+      Stms : List_Id;
+      Outp : Boolean);
+   --  Called to build an array or record stream procedure. The first three
+   --  arguments are the same as Build_Record_Or_Elementary_Output_Procedure.
+   --  Stms is the list of statements for the body (the declaration list is
+   --  always null), and Pnam is the name of the constructed procedure.
+   --  Used by Exp_Dist to generate stream-oriented attributes for RACWs.
+
 end Exp_Strm;