aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-05-29 13:42:22 +0200
committerTristan Gingold <tgingold@free.fr>2014-05-29 13:42:22 +0200
commit2f9dd1c6ae96ae1c53f2ad88d3ea2a8cc298fa24 (patch)
tree1fb24b1302be1503d631766b626fccb599fbac3a
parent595dda51e4f135f63a6f91970213f4de58201569 (diff)
downloadghdl-2f9dd1c6ae96ae1c53f2ad88d3ea2a8cc298fa24.tar.gz
ghdl-2f9dd1c6ae96ae1c53f2ad88d3ea2a8cc298fa24.tar.bz2
ghdl-2f9dd1c6ae96ae1c53f2ad88d3ea2a8cc298fa24.zip
Add_Dependence: noop if no current design.
-rw-r--r--sem.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/sem.adb b/sem.adb
index f90b29b95..042df9d2e 100644
--- a/sem.adb
+++ b/sem.adb
@@ -44,9 +44,17 @@ package body Sem is
procedure Sem_Component_Configuration
(Conf : Iir_Component_Configuration; Father : Iir);
- procedure Add_Dependence (Unit : Iir) is
+ procedure Add_Dependence (Unit : Iir)
+ is
+ Targ : constant Iir := Get_Current_Design_Unit;
begin
- Add_Dependence (Get_Current_Design_Unit, Unit);
+ -- During normal analysis, there is a current design unit. But not
+ -- during debugging outside of any context.
+ if Targ = Null_Iir then
+ return;
+ end if;
+
+ Add_Dependence (Targ, Unit);
end Add_Dependence;
-- LRM 1.1 Entity declaration.