diff options
author | Thomas Quinot <quinot@adacore.com> | 2007-08-14 10:45:05 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-14 10:45:05 +0200 |
commit | 9410151a22e5a54497fcc44bf30dccf3569441e0 (patch) | |
tree | d0e7a73386d172b2419d7f2ead4f393e6d2ab8d5 /gcc/ada/lib.adb | |
parent | 5e1527bd5913aa38b5975022665985773747127a (diff) | |
download | gcc-9410151a22e5a54497fcc44bf30dccf3569441e0.zip gcc-9410151a22e5a54497fcc44bf30dccf3569441e0.tar.gz gcc-9410151a22e5a54497fcc44bf30dccf3569441e0.tar.bz2 |
binde.adb (Elab_All_Links): Remove unnecessary call to Generic_Separately_Compiled (if...
2007-08-14 Thomas Quinot <quinot@adacore.com>
Vincent Celier <celier@adacore.com>
* binde.adb (Elab_All_Links): Remove unnecessary call to
Generic_Separately_Compiled (if a unit satisfies this predicate, there
won't be an associated Afile).
(Elab_All_Links): Fail if a referenced unit cannot be found
* bindgen.adb:
Fix comments in bindgen regarding consistency checks done in Bcheck:
the checks are made across units within a partition, not across several
partitions.
Fix generation of C binder file for VxWorks.
* lib.adb (Generic_Separately_Compiled): Rename to
Generic_May_Lack_ALI, more descriptive of the current use of the
predicate, and update documentation.
* lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
reorganization and documentation update for the case of predefined
library generics (for which we do not reference an Afile).
From-SVN: r127439
Diffstat (limited to 'gcc/ada/lib.adb')
-rw-r--r-- | gcc/ada/lib.adb | 60 |
1 files changed, 17 insertions, 43 deletions
diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb index c4afe04..7c5db5d 100644 --- a/gcc/ada/lib.adb +++ b/gcc/ada/lib.adb @@ -447,49 +447,23 @@ package body Lib is return False; end Entity_Is_In_Main_Unit; - --------------------------------- - -- Generic_Separately_Compiled -- - --------------------------------- - - function Generic_Separately_Compiled (E : Entity_Id) return Boolean is - begin - -- We do not generate object files for internal generics, because - -- the only thing they would contain is the elaboration boolean, and - -- we are careful to elaborate all predefined units first anyway, so - -- this boolean is not needed. - - if Is_Internal_File_Name - (Fname => Unit_File_Name (Get_Source_Unit (E)), - Renamings_Included => True) - then - return False; - - -- All other generic units do generate object files - - else - return True; - end if; - end Generic_Separately_Compiled; - - function Generic_Separately_Compiled - (Sfile : File_Name_Type) return Boolean - is - begin - -- Exactly the same as previous function, but works directly on a file - -- name. - - if Is_Internal_File_Name - (Fname => Sfile, - Renamings_Included => True) - then - return False; - - -- All other generic units do generate object files - - else - return True; - end if; - end Generic_Separately_Compiled; + -------------------------- + -- Generic_May_Lack_ALI -- + -------------------------- + + function Generic_May_Lack_ALI (Sfile : File_Name_Type) return Boolean is + begin + -- We allow internal generic units to be used without having a + -- corresponding ALI files to help bootstrapping with older compilers + -- that did not support generating ALIs for such generics. It is safe + -- to do so because the only thing the generated code would contain + -- is the elaboration boolean, and we are careful to elaborate all + -- predefined units first anyway. + + return Is_Internal_File_Name + (Fname => Sfile, + Renamings_Included => True); + end Generic_May_Lack_ALI; ----------------------------- -- Get_Code_Or_Source_Unit -- |