diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-01 18:19:35 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-01 18:19:35 +0200 |
commit | 938e200a82436734e7e4e30b1b3b7bc6498691ad (patch) | |
tree | e7f6d1cb04dec213b7ad32658471241874464f28 | |
parent | 503fd2851185e433d423b6c846e63e981d22acac (diff) | |
download | ghdl-938e200a82436734e7e4e30b1b3b7bc6498691ad.tar.gz ghdl-938e200a82436734e7e4e30b1b3b7bc6498691ad.tar.bz2 ghdl-938e200a82436734e7e4e30b1b3b7bc6498691ad.zip |
ghdldrv: add comments, analyze files for --synth/-e
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 2 | ||||
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 4 | ||||
-rw-r--r-- | src/libraries.adb | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index 9d6048cbf..a72cad5a1 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -243,12 +243,14 @@ package body Ghdlcomp is Unit : Iir; Next_Unit : Iir; begin + -- Load file and parse. Design_File := Load_File_Name (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; end if; + -- Analyze and add to the work library. Unit := Get_First_Design_Unit (Design_File); while Unit /= Null_Iir loop Finish_Compilation (Unit, True); diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index 70315dc31..8a961b4fb 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -82,6 +82,8 @@ package body Ghdlsynth is E_Opt : Integer; Opt_Arg : Natural; Config : Iir; + R : Node; + pragma Unreferenced (R); begin -- If the '-e' switch is present, there is a list of files. E_Opt := Args'First - 1; @@ -105,7 +107,7 @@ package body Ghdlsynth is -- Analyze files (if any) for I in Args'First .. E_Opt - 1 loop - Ghdlcomp.Compile_Analyze_File (Args (I).all); + R := Ghdlcomp.Compile_Analyze_File2 (Args (I).all); end loop; -- Elaborate diff --git a/src/libraries.adb b/src/libraries.adb index 715538c90..8dba5683d 100644 --- a/src/libraries.adb +++ b/src/libraries.adb @@ -709,6 +709,8 @@ package body Libraries is if Load_Library (Work_Library) = False then null; end if; + else + Set_Date (Work_Library, Date_Valid'First); end if; -- Add it to the list of libraries. |