diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-11-09 20:54:19 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-11-09 20:54:19 +0100 |
commit | 96245c0a4df7a6bc07cd8b7c15268c78c459f3b7 (patch) | |
tree | 8c9aacd46303689492872db13bb71cb2a61ba44a /src/vhdl/vhdl-sem_names.adb | |
parent | 144cedec159574df474579fa2cc7fde7e61eadbc (diff) | |
download | ghdl-96245c0a4df7a6bc07cd8b7c15268c78c459f3b7.tar.gz ghdl-96245c0a4df7a6bc07cd8b7c15268c78c459f3b7.tar.bz2 ghdl-96245c0a4df7a6bc07cd8b7c15268c78c459f3b7.zip |
vhdl: Iir_Kind_Foreign_Module is now a library unit
(instead of a design unit).
Also, add Iir_Kind_Foreign_Vector_Type_Definition
Diffstat (limited to 'src/vhdl/vhdl-sem_names.adb')
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 28bfcaab4..56096a2b0 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -2456,7 +2456,9 @@ package body Vhdl.Sem_Names is Check_Synopsys_Package (Prefix); end if; Sem.Add_Dependence (Res); - Res := Get_Library_Unit (Res); + if Get_Kind (Res) = Iir_Kind_Design_Unit then + Res := Get_Library_Unit (Res); + end if; elsif not Soft then Error_Msg_Sem (+Name, "unit %i not found in %n", (+Suffix, +Prefix)); @@ -4993,6 +4995,7 @@ package body Vhdl.Sem_Names is | Iir_Kind_Package_Instantiation_Declaration | Iir_Kind_Interface_Package_Declaration | Iir_Kind_Library_Declaration + | Iir_Kind_Foreign_Module | Iir_Kinds_Subprogram_Declaration | Iir_Kind_Component_Declaration => Res := Finish_Sem_Name (Name, Res); |