OSDN Git Service

New Language: Ada
[pf3gnuchains/gcc-fork.git] / gcc / ada / back_end.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             B A C K _ E N D                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision: 1.7 $
10 --                                                                          --
11 --          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- GNAT was originally developed  by the GNAT team at  New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 --  Call the back end with all the information needed. Also contains other
30 --  back-end specific interfaces required by the front end.
31
32 package Back_End is
33
34    type Back_End_Mode_Type is (
35       Generate_Object,
36       --  Full back end operation with object file generation
37
38       Declarations_Only,
39       --  Partial back end operation with no object file generation. In this
40       --  mode the only useful action performed by gigi is to process all
41       --  declarations issuing any error messages (in partcicular those to
42       --  do with rep clauses), and to back annotate representation info.
43
44       Skip);
45       --  Back end call is skipped (syntax only, or errors found)
46
47    pragma Convention (C, Back_End_Mode_Type);
48    for Back_End_Mode_Type use (0, 1, 2);
49
50    procedure Call_Back_End (Mode : Back_End_Mode_Type);
51    --  Call back end, i.e. make call to driver traversing the tree and
52    --  outputting code. This call is made with all tables locked.
53    --  The back end is responsible for unlocking any tables it may need
54    --  to change, and locking them again before returning.
55
56    procedure Scan_Compiler_Arguments;
57    --  Acquires command-line parameters passed to the compiler and processes
58    --  them. Calls Scan_Front_End_Switches for any front-end switches
59    --  encountered.
60    --
61    --  The processing of arguments is private to the back end, since
62    --  the way of acquiring the arguments as well as the set of allowable
63    --  back end switches is different depending on the particular back end
64    --  being used.
65    --
66    --  Any processed switches that influence the result of a compilation
67    --  must be added to the Compilation_Arguments table.
68
69 end Back_End;