aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-03-28 07:52:09 +0200
committerTristan Gingold <tgingold@free.fr>2023-03-28 07:52:09 +0200
commit67d99232ec83a09ae66e8608037d219d3850fadb (patch)
tree96cebd096187438449f774395290ce4480ada5ee /src
parent8b338ff39f9859389dc462fe33b82cc1c1f1864d (diff)
downloadghdl-67d99232ec83a09ae66e8608037d219d3850fadb.tar.gz
ghdl-67d99232ec83a09ae66e8608037d219d3850fadb.tar.bz2
ghdl-67d99232ec83a09ae66e8608037d219d3850fadb.zip
ghdlrun: report unreferenced nodes with --check-ast
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdlrun.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index e72f3d18d..f41a22e9a 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -35,6 +35,7 @@ with Vhdl.Std_Package;
with Vhdl.Canon;
with Vhdl.Ieee.Std_Logic_1164;
with Vhdl.Back_End;
+with Vhdl.Nodes_GC;
with Ortho_Jit;
with Ortho_Nodes; use Ortho_Nodes;
with Trans_Decls;
@@ -142,6 +143,10 @@ package body Ghdlrun is
-- This may happen (bad entity for example).
raise Compilation_Error;
end if;
+
+ if Flags.Check_Ast_Level > 0 then
+ Vhdl.Nodes_GC.Report_Unreferenced;
+ end if;
end Compile_Elab;
-- Set options.