aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-12-30 16:03:21 +0100
committerTristan Gingold <tgingold@free.fr>2020-12-30 16:03:21 +0100
commit604bc449138c8ed437af080d167b7b5d75856a83 (patch)
treed17ac71ac46388e98c561b42bd21c6e41428fa4c
parentf1c30ad16e0914455ee2c84e80714f6b271021f2 (diff)
downloadghdl-604bc449138c8ed437af080d167b7b5d75856a83.tar.gz
ghdl-604bc449138c8ed437af080d167b7b5d75856a83.tar.bz2
ghdl-604bc449138c8ed437af080d167b7b5d75856a83.zip
ghdlrun: factorize code for finalization
-rw-r--r--src/ghdldrv/ghdlrun.adb12
-rw-r--r--src/options.adb3
2 files changed, 5 insertions, 10 deletions
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index 2e35122e7..ede0e2d85 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -28,13 +28,11 @@ with Ghdlmain; use Ghdlmain;
with Ghdllocal; use Ghdllocal;
with Simple_IO; use Simple_IO;
-with Str_Table;
with Hash;
with Interning;
-with Files_Map;
with Name_Table;
with Flags;
-with Libraries;
+with Options;
with Errorout; use Errorout;
with Vhdl.Nodes; use Vhdl.Nodes;
@@ -42,7 +40,6 @@ with Vhdl.Std_Package;
with Vhdl.Errors; use Vhdl.Errors;
with Vhdl.Canon;
with Vhdl.Ieee.Std_Logic_1164;
-with Vhdl.Lists;
with Ortho_Jit;
with Ortho_Nodes; use Ortho_Nodes;
with Trans_Decls;
@@ -764,12 +761,7 @@ package body Ghdlrun is
Ortho_Jit.Finish;
Translation.Finalize;
- Vhdl.Lists.Finalize;
- Str_Table.Finalize;
- Vhdl.Nodes.Finalize;
- Files_Map.Finalize;
- Name_Table.Finalize;
- Libraries.Finalize;
+ Options.Finalize;
if Flag_Verbose then
Put_Line ("Starting simulation");
diff --git a/src/options.adb b/src/options.adb
index ad9558f9d..e79c4b387 100644
--- a/src/options.adb
+++ b/src/options.adb
@@ -59,6 +59,9 @@ package body Options is
Vhdl.Nodes.Finalize;
Files_Map.Finalize;
Libraries.Finalize;
+ -- TODO: finalize errors (reset counters, handlers...)
+ -- TODO: PSL
+ -- TODO: backend
end Finalize;
function Option_Warning (Opt: String; Val : Boolean) return Option_State is