]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/fmap.ads
exp_atag.ads, [...]: Replace headers with GPL v3 headers.
[thirdparty/gcc.git] / gcc / ada / fmap.ads
CommitLineData
6510f4c9
GB
1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
4-- --
5-- F M A P --
6-- --
7-- S p e c --
8-- --
39f4e199 9-- Copyright (C) 2001-2007, Free Software Foundation, Inc. --
6510f4c9
GB
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- --
b5c84c3c 13-- ware Foundation; either version 3, or (at your option) any later ver- --
6510f4c9
GB
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 --
b5c84c3c
RD
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. --
6510f4c9
GB
20-- --
21-- GNAT was originally developed by the GNAT team at New York University. --
71ff80dc 22-- Extensive contributions were provided by Ada Core Technologies Inc. --
6510f4c9
GB
23-- --
24------------------------------------------------------------------------------
25
26-- This package keeps two mappings: from unit names to file names,
27-- and from file names to path names.
28
39f4e199 29with Namet; use Namet;
6510f4c9
GB
30
31package Fmap is
32
33 procedure Initialize (File_Name : String);
34 -- Initialize the mappings from the mapping file File_Name.
35 -- If the mapping file is incorrect (non existent file, truncated file,
36 -- duplicate entries), output a warning and do not initialize the mappings.
07fc65c4
GB
37 -- Record the state of the mapping tables in case Update is called
38 -- later on.
6510f4c9 39
17c5c8a5 40 function Mapped_Path_Name (File : File_Name_Type) return File_Name_Type;
6510f4c9
GB
41 -- Return the path name mapped to the file name File.
42 -- Return No_File if File is not mapped.
43
17c5c8a5 44 function Mapped_File_Name (Unit : Unit_Name_Type) return File_Name_Type;
6510f4c9
GB
45 -- Return the file name mapped to the unit name Unit.
46 -- Return No_File if Unit is not mapped.
fbf5a39b 47 -- Return Error_Name if it is forbidden.
6510f4c9 48
17c5c8a5 49 procedure Add_To_File_Map
6510f4c9
GB
50 (Unit_Name : Unit_Name_Type;
51 File_Name : File_Name_Type;
52 Path_Name : File_Name_Type);
53 -- Add mapping of Unit_Name to File_Name and of File_Name to Path_Name
54
07fc65c4
GB
55 procedure Update_Mapping_File (File_Name : String);
56 -- If Add_To_File_Map has been called (after Initialize or any time
57 -- if Initialize has not been called), append the new entries to the
fbf5a39b
AC
58 -- mapping file whose file name is File_Name.
59
60 procedure Reset_Tables;
61 -- Initialize all the internal data structures. This procedure is used
62 -- when several compilations are performed by the same process (by GNSA
63 -- for ASIS, for example) to remove any existing mappings from a previous
64 -- compilation.
65
39f4e199 66 procedure Add_Forbidden_File_Name (Name : File_Name_Type);
fbf5a39b 67 -- Indicate that a source file name is forbidden.
a2c20cfa
AC
68 -- This is used by gnatmake when there are excluded sources in projects
69 -- (attributes Excluded_Source_Files or Locally_Removed_Files).
fbf5a39b 70
39f4e199 71 procedure Remove_Forbidden_File_Name (Name : File_Name_Type);
fbf5a39b 72 -- Indicate that a source file name that was forbidden is no longer
a2c20cfa 73 -- forbidden. Used by gnatmake when an excluded source is redefined
fbf5a39b 74 -- in another extending project.
07fc65c4 75
6510f4c9 76end Fmap;