OSDN Git Service

2009-08-17 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / fmap.ads
index 91bbf62..f1d54db 100644 (file)
@@ -6,19 +6,17 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                                                                          --
---            Copyright (C) 2001, Free Software Foundation, Inc.            --
+--          Copyright (C) 2001-2009, 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.      --
 
 --  This package keeps two mappings: from unit names to file names,
 --  and from file names to path names.
+--
+--  This mapping is used to communicate between the builder (gnatmake or
+--  gprbuild) and the compiler. The format of this mapping file is the
+--  following:
+--  For each source file, there are three lines in the mapping file:
+--    Unit name with %b or %s added depending on whether it is a body or a spec
+--              This line is omitted for file-based languages
+--    File name
+--    Path name (set to '/' if the file should be ignored in fact, ie for
+--               a Locally_Removed_File in a project)
 
-with Types; use Types;
+with Namet; use Namet;
 
 package Fmap is
 
@@ -46,6 +54,7 @@ package Fmap is
    function Mapped_File_Name (Unit : Unit_Name_Type) return File_Name_Type;
    --  Return the file name mapped to the unit name Unit.
    --  Return No_File if Unit is not mapped.
+   --  Return Error_Name if it is forbidden.
 
    procedure Add_To_File_Map
      (Unit_Name : Unit_Name_Type;
@@ -56,7 +65,17 @@ package Fmap is
    procedure Update_Mapping_File (File_Name : String);
    --  If Add_To_File_Map has been called (after Initialize or any time
    --  if Initialize has not been called), append the new entries to the
-   --  to the mapping file.
-   --  What is the significance of the parameter File_Name ???
+   --  mapping file whose file name is File_Name.
+
+   procedure Reset_Tables;
+   --  Initialize all the internal data structures. This procedure is used
+   --  when several compilations are performed by the same process (by GNSA
+   --  for ASIS, for example) to remove any existing mappings from a previous
+   --  compilation.
+
+   procedure Add_Forbidden_File_Name (Name : File_Name_Type);
+   --  Indicate that a source file name is forbidden. This is used when there
+   --  are excluded sources in projects (attributes Excluded_Source_Files or
+   --  Locally_Removed_Files).
 
 end Fmap;