diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-14 18:35:41 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-11-14 18:35:41 +0100 |
commit | b6c523106ab498375a7874923742c6b806700a9a (patch) | |
tree | 83f21964f8290a845a9acaba325056f5a420a963 /src/ghdldrv | |
parent | 12ea165c7474ad0a7a486062f816071378492eed (diff) | |
download | ghdl-b6c523106ab498375a7874923742c6b806700a9a.tar.gz ghdl-b6c523106ab498375a7874923742c6b806700a9a.tar.bz2 ghdl-b6c523106ab498375a7874923742c6b806700a9a.zip |
Create sem_lib from libraries.
Diffstat (limited to 'src/ghdldrv')
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 11 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 17 | ||||
-rw-r--r-- | src/ghdldrv/ghdlprint.adb | 15 | ||||
-rw-r--r-- | src/ghdldrv/ghdlxml.adb | 3 |
4 files changed, 25 insertions, 21 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index eb1ef80e3..5ccb1f9ab 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -25,6 +25,7 @@ with Ada.Text_IO; with Types; with Flags; with Sem; +with Sem_Lib; use Sem_Lib; with Name_Table; with Errorout; use Errorout; with Libraries; @@ -214,7 +215,7 @@ package body Ghdlcomp is Design : Iir; Next_Design : Iir; begin - Res := Libraries.Load_File (Name_Table.Get_Identifier (File)); + Res := Load_File (Name_Table.Get_Identifier (File)); if Errorout.Nbr_Errors > 0 then raise Compilation_Error; end if; @@ -238,7 +239,7 @@ package body Ghdlcomp is Unit : Iir; Next_Unit : Iir; begin - Design_File := Libraries.Load_File (Id); + Design_File := Load_File (Id); if Design_File = Null_Iir or else Errorout.Nbr_Errors > 0 then -- Stop now in case of error (file not found or parse error). return Design_File; @@ -246,7 +247,7 @@ package body Ghdlcomp is Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop - Libraries.Finish_Compilation (Unit, True); + Finish_Compilation (Unit, True); Next_Unit := Get_Chain (Unit); @@ -396,7 +397,7 @@ package body Ghdlcomp is -- Parse all files. for I in Args'Range loop Id := Name_Table.Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Load_File (Id); if Errorout.Nbr_Errors > 0 then raise Compilation_Error; end if; @@ -410,7 +411,7 @@ package body Ghdlcomp is if Design_File /= Null_Iir then Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop - Libraries.Finish_Compilation (Unit, True); + Finish_Compilation (Unit, True); Next_Unit := Get_Chain (Unit); diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index 19481e88b..022ae98c5 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -20,6 +20,7 @@ with Ada.Command_Line; with GNAT.Directory_Operations; with Types; use Types; with Libraries; +with Sem_Lib; with Std_Package; with Flags; with Name_Table; @@ -632,7 +633,7 @@ package body Ghdllocal is for I in Args'Range loop Id := Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Sem_Lib.Load_File (Id); if Design_File /= Null_Iir then Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop @@ -693,7 +694,7 @@ package body Ghdllocal is -- Parse all files. for I in Args'Range loop Id := Name_Table.Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Sem_Lib.Load_File (Id); if Design_File /= Null_Iir then Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop @@ -728,7 +729,7 @@ package body Ghdllocal is | Date_Analyzed => null; when Date_Parsed => - Libraries.Finish_Compilation (Unit, False); + Sem_Lib.Finish_Compilation (Unit, False); when others => raise Internal_Error; end case; @@ -780,7 +781,7 @@ package body Ghdllocal is Put (File_Name); Put_Line (":"); end if; - Design_File := Libraries.Load_File (Id); + Design_File := Sem_Lib.Load_File (Id); if Design_File = Null_Iir then raise Errorout.Compilation_Error; end if; @@ -793,7 +794,7 @@ package body Ghdllocal is New_Line; end if; -- Sem, canon, annotate a design unit. - Libraries.Finish_Compilation (Unit, True); + Sem_Lib.Finish_Compilation (Unit, True); Next_Unit := Get_Chain (Unit); if Errorout.Nbr_Errors = 0 then @@ -1224,14 +1225,14 @@ package body Ghdllocal is -- date. Unit := Get_First_Design_Unit (File); while Unit /= Null_Iir loop - Load_Parse_Design_Unit (Unit, Null_Iir); + Sem_Lib.Load_Parse_Design_Unit (Unit, Null_Iir); Extract_Library_Clauses (Unit); Unit := Get_Chain (Unit); end loop; else -- File has been modified. -- Parse it. - Design_File := Load_File (Fe); + Design_File := Sem_Lib.Load_File (Fe); -- Exit now in case of parse error. if Design_File = Null_Iir @@ -1349,7 +1350,7 @@ package body Ghdllocal is Get_File_Checksum (File)) then -- FILE has been modified. - Design_File := Libraries.Load_File (Fe); + Design_File := Sem_Lib.Load_File (Fe); if Design_File /= Null_Iir then Libraries.Add_Design_File_Into_Library (Design_File); end if; diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb index 531d6125a..04e7bd207 100644 --- a/src/ghdldrv/ghdlprint.adb +++ b/src/ghdldrv/ghdlprint.adb @@ -33,6 +33,7 @@ with Parse; with Canon; with Version; with Xrefs; +with Sem_Lib; use Sem_Lib; with Ghdlmain; use Ghdlmain; with Ghdllocal; use Ghdllocal; with Disp_Vhdl; @@ -677,7 +678,7 @@ package body Ghdlprint is -- exist. for I in Args'Range loop Id := Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Load_File (Id); if Design_File = Null_Iir then raise Compile_Error; end if; @@ -707,7 +708,7 @@ package body Ghdlprint is -- Second loop: do the real work. for I in Args'Range loop Id := Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Load_File (Id); Unit := Get_First_Design_Unit (Design_File); declare use Files_Map; @@ -991,7 +992,7 @@ package body Ghdlprint is -- Parse all files. for I in Args'Range loop Id := Name_Table.Get_Identifier (Args (I).all); - Design_File := Libraries.Load_File (Id); + Design_File := Load_File (Id); if Design_File = Null_Iir then raise Errorout.Compilation_Error; end if; @@ -999,7 +1000,7 @@ package body Ghdlprint is Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop -- Analyze the design unit. - Libraries.Finish_Compilation (Unit, True); + Sem_Lib.Finish_Compilation (Unit, True); Next_Unit := Get_Chain (Unit); if Errorout.Nbr_Errors = 0 then @@ -1280,7 +1281,7 @@ package body Ghdlprint is | Date_Disk => raise Internal_Error; when Date_Parse => - Libraries.Load_Design_Unit (Unit, Null_Iir); + Sem_Lib.Load_Design_Unit (Unit, Null_Iir); when Date_Analyze => null; end case; @@ -1340,7 +1341,7 @@ package body Ghdlprint is return; end if; Files (I).Fe := File; - Files (I).Design_File := Libraries.Load_File (File); + Files (I).Design_File := Load_File (File); if Files (I).Design_File = Null_Iir then return; end if; @@ -1573,7 +1574,7 @@ package body Ghdlprint is return; end if; Files (I).Fe := File; - Files (I).Design_File := Libraries.Load_File (File); + Files (I).Design_File := Load_File (File); if Files (I).Design_File = Null_Iir then return; end if; diff --git a/src/ghdldrv/ghdlxml.adb b/src/ghdldrv/ghdlxml.adb index 49a997670..a37e6dbe1 100644 --- a/src/ghdldrv/ghdlxml.adb +++ b/src/ghdldrv/ghdlxml.adb @@ -26,6 +26,7 @@ with Ghdlprint; use Ghdlprint; with Libraries; with Errorout; use Errorout; with Iirs; use Iirs; +with Sem_Lib; use Sem_Lib; with Ghdlmain; use Ghdlmain; with Ghdllocal; use Ghdllocal; @@ -561,7 +562,7 @@ package body Ghdlxml is return; end if; Files (I).Fe := File; - Files (I).Design_File := Libraries.Load_File (File); + Files (I).Design_File := Load_File (File); if Files (I).Design_File = Null_Iir then return; end if; |