aboutsummaryrefslogtreecommitdiffstats
path: root/src/libraries.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-11-14 18:35:41 +0100
committerTristan Gingold <tgingold@free.fr>2018-11-14 18:35:41 +0100
commitb6c523106ab498375a7874923742c6b806700a9a (patch)
tree83f21964f8290a845a9acaba325056f5a420a963 /src/libraries.ads
parent12ea165c7474ad0a7a486062f816071378492eed (diff)
downloadghdl-b6c523106ab498375a7874923742c6b806700a9a.tar.gz
ghdl-b6c523106ab498375a7874923742c6b806700a9a.tar.bz2
ghdl-b6c523106ab498375a7874923742c6b806700a9a.zip
Create sem_lib from libraries.
Diffstat (limited to 'src/libraries.ads')
-rw-r--r--src/libraries.ads51
1 files changed, 7 insertions, 44 deletions
diff --git a/src/libraries.ads b/src/libraries.ads
index e8060c522..df2843d7a 100644
--- a/src/libraries.ads
+++ b/src/libraries.ads
@@ -99,25 +99,6 @@ package Libraries is
-- Save the work library as a host-dependent library.
procedure Save_Work_Library;
- -- Start the analyse a file (ie load and parse it).
- -- The file is read from the current directory (unless FILE_NAME is an
- -- absolute path).
- -- Emit an error if the file cannot be opened.
- -- Return NULL_IIR in case of parse error.
- function Load_File (File_Name: Name_Id) return Iir_Design_File;
- function Load_File (File : Source_File_Entry) return Iir_Design_File;
-
- -- Load, parse, analyze, back-end a design_unit if necessary.
- -- Check Design_Unit is not obsolete.
- -- LOC is the location where the design unit was needed, in case of error.
- procedure Load_Design_Unit (Design_Unit: Iir_Design_Unit; Loc : Iir);
-
- -- Load and parse DESIGN_UNIT.
- -- Contrary to Load_Design_Unit, the design_unit is not analyzed.
- -- Also, the design_unit must not have been already loaded.
- -- Used almost only by Load_Design_Unit.
- procedure Load_Parse_Design_Unit (Design_Unit: Iir_Design_Unit; Loc : Iir);
-
-- Remove the same file as DESIGN_FILE from work library and all of its
-- units.
procedure Purge_Design_File (Design_File : Iir_Design_File);
@@ -127,31 +108,6 @@ package Libraries is
(Library: Iir_Library_Declaration; Name: Name_Id)
return Iir_Design_Unit;
- -- Load an already analyzed primary unit NAME from library LIBRARY
- -- and compile it.
- -- Return NULL_IIR if not found (ie, NAME does not correspond to a
- -- library unit identifier).
- function Load_Primary_Unit
- (Library: Iir_Library_Declaration; Name: Name_Id; Loc : Iir)
- return Iir_Design_Unit;
-
- -- Find the secondary unit of PRIMARY.
- -- If PRIMARY is a package declaration, returns the package body,
- -- If PRIMARY is an entity declaration, returns the architecture NAME.
- -- Return NULL_IIR if not found.
- function Find_Secondary_Unit (Primary: Iir_Design_Unit; Name: Name_Id)
- return Iir_Design_Unit;
-
- -- Load an secondary unit of primary unit PRIMARY and analyse it.
- -- NAME must be set only for an architecture.
- function Load_Secondary_Unit
- (Primary: Iir_Design_Unit; Name: Name_Id; Loc : Iir)
- return Iir_Design_Unit;
-
- -- Analyze UNIT.
- procedure Finish_Compilation
- (Unit : Iir_Design_Unit; Main : Boolean := False);
-
-- Get or create a library from an identifier.
-- LOC is used only to report errors.
function Get_Library (Ident : Name_Id; Loc : Location_Type)
@@ -190,6 +146,13 @@ package Libraries is
-- Return null_iir if the design unit is not found.
function Find_Design_Unit (Unit : Iir) return Iir_Design_Unit;
+ -- Find the secondary unit of PRIMARY.
+ -- If PRIMARY is a package declaration, returns the package body,
+ -- If PRIMARY is an entity declaration, returns the architecture NAME.
+ -- Return NULL_IIR if not found.
+ function Find_Secondary_Unit (Primary: Iir_Design_Unit; Name: Name_Id)
+ return Iir_Design_Unit;
+
-- Search design file NAME in library LIB. This is not very efficient as
-- this is a simple linear search. NAME must correspond exactely to the
-- design file name.