diff options
| author | Tristan Gingold <tgingold@free.fr> | 2023-03-22 03:43:51 +0100 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2023-03-22 04:44:25 +0100 | 
| commit | 3fa9561c3c54ef31ef4fd80ee240bc56029f90d0 (patch) | |
| tree | 0ac910d44263305c29fee948aa60810c8c0c2f4f /src/vhdl/vhdl-sem_inst.adb | |
| parent | 3f9512b68752421200b4fc34645a25a494c01c9f (diff) | |
| download | ghdl-3fa9561c3c54ef31ef4fd80ee240bc56029f90d0.tar.gz ghdl-3fa9561c3c54ef31ef4fd80ee240bc56029f90d0.tar.bz2 ghdl-3fa9561c3c54ef31ef4fd80ee240bc56029f90d0.zip  | |
vhdl: generate and handle package_instantiation_body
Diffstat (limited to 'src/vhdl/vhdl-sem_inst.adb')
| -rw-r--r-- | src/vhdl/vhdl-sem_inst.adb | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb index 57225e2ae..66754d91d 100644 --- a/src/vhdl/vhdl-sem_inst.adb +++ b/src/vhdl/vhdl-sem_inst.adb @@ -1219,6 +1219,7 @@ package body Vhdl.Sem_Inst is        Pkg : constant Iir := Get_Uninstantiated_Package_Decl (Inst);        Prev_Instance_File : constant Source_File_Entry := Instance_File;        Mark : constant Instance_Index_Type := Prev_Instance_Table.Last; +      Bod : constant Iir := Get_Package_Body (Pkg);        Res : Iir;     begin        Create_Relocation (Inst, Pkg); @@ -1302,7 +1303,14 @@ package body Vhdl.Sem_Inst is          (Get_Declaration_Chain (Pkg), Get_Declaration_Chain (Inst));        --  Instantiate the body. -      Res := Instantiate_Iir (Get_Package_Body (Pkg), False); + +      Res := Create_Iir (Iir_Kind_Package_Instantiation_Body); +      Location_Copy (Res, Inst); +      Set_Declaration_Chain +        (Res, Instantiate_Iir_Chain (Get_Declaration_Chain (Bod))); +      Set_Attribute_Value_Chain +        (Res, Instantiate_Iir_Chain (Get_Attribute_Value_Chain (Bod))); +      Set_Package (Res, Inst);        Set_Identifier (Res, Get_Identifier (Inst));        --  Restore.  | 
