2015-03-04 Robert Dewar <dewar@adacore.com>
[official-gcc.git] / gcc / ada / prepcomp.ads
blob20a69bfbd4cc6594c2b9e4e5f8ef15c96d7a1cfc
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- P R E P C O M P --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2002-2014, 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 ------------------------------------------------------------------------------
26 -- This package stores all preprocessing data for the compiler
28 with Namet; use Namet;
29 with Types; use Types;
31 package Prepcomp is
33 procedure Add_Dependency (S : Source_File_Index);
34 -- Add a dependency on a non-source file. This is used internally for the
35 -- preprocessing data file and the preprocessing definition file, and also
36 -- externally for non-temporary configuration pragmas files.
38 procedure Add_Dependencies;
39 -- Add dependencies on the preprocessing data file and the preprocessing
40 -- definition files, if any, and the non-temporary configuration pragmas
41 -- files, if any.
43 procedure Check_Symbols;
44 -- Check if there are preprocessing symbols on the command line and set
45 -- preprocessing if there are some: all files are preprocessed with these
46 -- symbols. This procedure should not be called if there is a preprocessing
47 -- data file specified on the command line. Instead a call should be made
48 -- to Parse_Preprocessing_Data_File.
50 procedure Parse_Preprocessing_Data_File (N : File_Name_Type);
51 -- Parse a preprocessing data file, specified with a -gnatep= switch
53 procedure Prepare_To_Preprocess
54 (Source : File_Name_Type;
55 Preprocessing_Needed : out Boolean);
56 -- Prepare, if necessary, the preprocessor for a source file. If the source
57 -- file needs to be preprocessed, Preprocessing_Needed is set to True.
58 -- Otherwise, Preprocessing_Needed is set to False and no preprocessing
59 -- needs to be done.
61 procedure Process_Command_Line_Symbol_Definitions;
62 -- Check symbol definitions that have been added by calls to procedure
63 -- Add_Symbol_Definition and stored as pointers to string, and put them in
64 -- a table. The reason the definitions were stored as pointer to strings is
65 -- that the name table is not yest initialized when we process the command
66 -- line switches. These symbol definitions will be later used in
67 -- the call to Prepare_To_Preprocess.
69 end Prepcomp;