diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-25 11:18:43 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-25 11:18:43 +0200 |
commit | 5b900a4520087e5e38fe938e55932e6bd779d1e9 (patch) | |
tree | 9985a90114e8cc5c0d37f35599fac92a57c4698b /gcc/ada/fmap.adb | |
parent | a2b62f99d5c193d5d6e6b16777501338cc519789 (diff) | |
download | gcc-5b900a4520087e5e38fe938e55932e6bd779d1e9.zip gcc-5b900a4520087e5e38fe938e55932e6bd779d1e9.tar.gz gcc-5b900a4520087e5e38fe938e55932e6bd779d1e9.tar.bz2 |
[multiple changes]
2009-06-25 Vincent Celier <celier@adacore.com>
* s-os_lib.adb (Normalize_Pathname.Get_Directory): If directory
provided, on Windows change all '/' to '\'.
* fmap.ads, fmap.adb (Remove_Forbidden_File_Name): Remove, no longer
used. Minor comment changes
* prj-nmsc.adb: Do not call Fmap.Add_Forbidden_File_Name or
Remove_Forbidden_File_Name.
2009-06-25 Quentin Ochem <ochem@adacore.com>
* prj.ads (Unit_Index): Now general access type.
From-SVN: r148936
Diffstat (limited to 'gcc/ada/fmap.adb')
-rw-r--r-- | gcc/ada/fmap.adb | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/gcc/ada/fmap.adb b/gcc/ada/fmap.adb index 0d5061d..8de27ec 100644 --- a/gcc/ada/fmap.adb +++ b/gcc/ada/fmap.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2008, 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- -- @@ -191,16 +191,17 @@ package body Fmap is -- Remove all entries in case of incorrect mapping file function Find_File_Name return File_Name_Type; - -- Return Error_File_Name for "/", otherwise call Name_Find - -- What is this about, explanation required ??? + -- Return Error_File_Name if the name buffer contains "/", otherwise + -- call Name_Find. "/" is the path name in the mapping file to indicate + -- that a source has been suppressed, and thus should not be found by + -- the compiler. function Find_Unit_Name return Unit_Name_Type; - -- Return Error_Unit_Name for "/", otherwise call Name_Find - -- Even more mysterious??? function appeared when Find_Name was split - -- for the two types, but this routine is definitely called! + -- Return the unit name in the name buffer. Return Error_Unit_Name if + -- the name buffer contains "/". procedure Get_Line; - -- Get a line from the mapping file + -- Get a line from the mapping file, where a line is SP (First .. Last) procedure Report_Truncated; -- Report a warning when the mapping file is truncated @@ -223,12 +224,16 @@ package body Fmap is -- Find_File_Name -- -------------------- - -- Why is only / illegal, why not \ on windows ??? - function Find_File_Name return File_Name_Type is begin if Name_Buffer (1 .. Name_Len) = "/" then + + -- A path name of "/" is the indication that the source has been + -- "suppressed". Return Error_File_Name so that the compiler does + -- not find the source, even if it is in the include path. + return Error_File_Name; + else return Name_Find; end if; @@ -241,7 +246,6 @@ package body Fmap is function Find_Unit_Name return Unit_Name_Type is begin return Unit_Name_Type (Find_File_Name); - -- very odd ??? end Find_Unit_Name; -------------- @@ -413,15 +417,6 @@ package body Fmap is end if; end Mapped_Path_Name; - -------------------------------- - -- Remove_Forbidden_File_Name -- - -------------------------------- - - procedure Remove_Forbidden_File_Name (Name : File_Name_Type) is - begin - Forbidden_Names.Set (Name, False); - end Remove_Forbidden_File_Name; - ------------------ -- Reset_Tables -- ------------------ |