summaryrefslogtreecommitdiff
path: root/sem.adb
diff options
context:
space:
mode:
Diffstat (limited to 'sem.adb')
-rw-r--r--sem.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/sem.adb b/sem.adb
index f90b29b..042df9d 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.