diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-12 05:24:29 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-12 05:24:29 +0100 |
commit | 650e68b382f5a3c9404b74c7f39a4b769a46350a (patch) | |
tree | 5e07ebc00124279c3afceef952ab2475912e53d2 /src/vhdl/translate | |
parent | 61a92020340fb46d0f68c314d3907b6ef74a3e3a (diff) | |
download | ghdl-650e68b382f5a3c9404b74c7f39a4b769a46350a.tar.gz ghdl-650e68b382f5a3c9404b74c7f39a4b769a46350a.tar.bz2 ghdl-650e68b382f5a3c9404b74c7f39a4b769a46350a.zip |
Instantiate declarations of interface packages.
Fix #476
Diffstat (limited to 'src/vhdl/translate')
-rw-r--r-- | src/vhdl/translate/trans-chap2.adb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb index 41913c452..4afe598c9 100644 --- a/src/vhdl/translate/trans-chap2.adb +++ b/src/vhdl/translate/trans-chap2.adb @@ -1502,20 +1502,26 @@ package body Trans.Chap2 is begin Inter := Chain; while Inter /= Null_Iir loop + Orig := Sem_Inst.Get_Origin (Inter); + Orig_Info := Get_Info (Orig); + + Info := Add_Info (Inter, Orig_Info.Kind); + Copy_Info (Info, Orig_Info); + case Get_Kind (Inter) is - when Iir_Kind_Interface_Constant_Declaration - | Iir_Kind_Interface_Package_Declaration => - Orig := Sem_Inst.Get_Origin (Inter); - Orig_Info := Get_Info (Orig); + when Iir_Kind_Interface_Constant_Declaration => + null; - Info := Add_Info (Inter, Orig_Info.Kind); - Copy_Info (Info, Orig_Info); - Clean_Copy_Info (Info); + when Iir_Kind_Interface_Package_Declaration => + Instantiate_Iir_Generic_Chain_Info (Get_Generic_Chain (Inter)); + Instantiate_Iir_Chain_Info (Get_Declaration_Chain (Inter)); when others => raise Internal_Error; end case; + Clean_Copy_Info (Info); + Inter := Get_Chain (Inter); end loop; end Instantiate_Iir_Generic_Chain_Info; |