1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT COMPILER COMPONENTS                         --
4--                                                                          --
5--                             S E M _ E L I M                              --
6--                                                                          --
7--                                 S p e c                                  --
8--                                                                          --
9--          Copyright (C) 1997-2008, Free Software Foundation, Inc.         --
10--                                                                          --
11-- GNAT is free software;  you can  redistribute it  and/or modify it under --
12-- terms of the  GNU General Public License as published  by the Free Soft- --
13-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17-- for  more details.  You should have  received  a copy of the GNU General --
18-- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
19-- http://www.gnu.org/licenses for a complete copy of the license.          --
20--                                                                          --
21-- GNAT was originally developed  by the GNAT team at  New York University. --
22-- Extensive contributions were provided by Ada Core Technologies Inc.      --
23--                                                                          --
24------------------------------------------------------------------------------
25
26--  This package contains the routines used to process the Eliminate pragma
27
28with Types; use Types;
29
30package Sem_Elim is
31
32   procedure Initialize;
33   --  Initialize for new main source program
34
35   procedure Process_Eliminate_Pragma
36     (Pragma_Node         : Node_Id;
37      Arg_Unit_Name       : Node_Id;
38      Arg_Entity          : Node_Id;
39      Arg_Parameter_Types : Node_Id;
40      Arg_Result_Type     : Node_Id;
41      Arg_Source_Location : Node_Id);
42   --  Process eliminate pragma (given by Pragma_Node). The number of
43   --  arguments has been checked, as well as possible optional identifiers,
44   --  but no other checks have been made. This subprogram completes the
45   --  checking, and then if the pragma is well formed, makes appropriate
46   --  entries in the internal tables used to keep track of Eliminate pragmas.
47   --  The other five arguments are expressions (rather than pragma argument
48   --  associations) for the possible pragma arguments. A parameter that
49   --  is not present is set to Empty.
50
51   procedure Check_Eliminated (E : Entity_Id);
52   --  Checks if entity E is eliminated, and if so sets the Is_Eliminated
53   --  flag on the given entity.
54
55   procedure Check_For_Eliminated_Subprogram (N : Node_Id; S : Entity_Id);
56   --  Check that the subprogram S (or its ultimate parent in the case of a
57   --  derived subprogram or renaming) has not been eliminated. An error will
58   --  be flagged if the subprogram has been eliminated, unless the node N
59   --  occurs within an eliminated subprogram or within a generic unit. The
60   --  error will be posted on N.
61
62   procedure Eliminate_Error_Msg (N : Node_Id; E : Entity_Id);
63   --  Called by the front-end and back-end on encountering a reference to an
64   --  eliminated subprogram. N is the node for the reference (such as occurs
65   --  in a call or attribute), and E is the entity of the subprogram that has
66   --  been eliminated.
67
68end Sem_Elim;
69