diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-03-23 07:25:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-03-23 07:25:15 +0100 |
commit | b9bd50be737ff13967edf442717673fd9100941f (patch) | |
tree | f874c2b76751c7408591f5c8fae4e8d0cfad69f7 /src/vhdl | |
parent | 863df0ba75e7bd883b53a47e600955c249015462 (diff) | |
download | ghdl-b9bd50be737ff13967edf442717673fd9100941f.tar.gz ghdl-b9bd50be737ff13967edf442717673fd9100941f.tar.bz2 ghdl-b9bd50be737ff13967edf442717673fd9100941f.zip |
vhdl: make instance_package_body forward_ref, adjust
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-configuration.adb | 1 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_inst.adb | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/vhdl/vhdl-configuration.adb b/src/vhdl/vhdl-configuration.adb index a05009c7a..b17a5d2c5 100644 --- a/src/vhdl/vhdl-configuration.adb +++ b/src/vhdl/vhdl-configuration.adb @@ -195,7 +195,6 @@ package body Vhdl.Configuration is end if; end if; if Bod /= Null_Iir then - Set_Package (Get_Library_Unit (Bod), Lib_Unit); Add_Design_Unit (Bod, Loc); end if; end; diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 8601159db..7b1f476e1 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -8149,7 +8149,7 @@ package Vhdl.Nodes is procedure Set_Package_Body (Pkg : Iir; Decl : Iir); -- The package body corresponding to the package declaration. - -- Field: Field4 + -- Field: Field4 Forward_Ref function Get_Instance_Package_Body (Pkg : Iir) return Iir; procedure Set_Instance_Package_Body (Pkg : Iir; Decl : Iir); diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index d3187b7cc..61b9cff37 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -2012,7 +2012,7 @@ package body Vhdl.Nodes_Meta is when Field_Package_Body => return Attr_Forward_Ref; when Field_Instance_Package_Body => - return Attr_None; + return Attr_Forward_Ref; when Field_Need_Body => return Attr_None; when Field_Immediate_Body_Flag => diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb index 66754d91d..02e63836d 100644 --- a/src/vhdl/vhdl-sem_inst.adb +++ b/src/vhdl/vhdl-sem_inst.adb @@ -614,7 +614,9 @@ package body Vhdl.Sem_Inst is -- Do not instantiate the body of a package while -- instantiating a shared package. if not Is_Within_Shared_Instance then - Instantiate_Iir_Field (Res, N, F); + Set_Instance_Package_Body + (Res, Instantiate_Iir (Get_Instance_Package_Body (N), + False)); end if; when Field_Subtype_Definition => |