diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-09-20 08:07:54 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-09-20 08:07:54 +0200 |
commit | f0815de199ae3835d2555c1b85732977e8d72afe (patch) | |
tree | d9f769f7de2486b255b29350b654f4ceef5d6b62 /src/vhdl/sem.adb | |
parent | 06328816aa9cda1137b5dd0bd59c3075bd40f810 (diff) | |
download | ghdl-f0815de199ae3835d2555c1b85732977e8d72afe.tar.gz ghdl-f0815de199ae3835d2555c1b85732977e8d72afe.tar.bz2 ghdl-f0815de199ae3835d2555c1b85732977e8d72afe.zip |
Create a pseudo source file for instantiation.
Diffstat (limited to 'src/vhdl/sem.adb')
-rw-r--r-- | src/vhdl/sem.adb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb index 711b2c7ee..8de3f149c 100644 --- a/src/vhdl/sem.adb +++ b/src/vhdl/sem.adb @@ -2854,11 +2854,9 @@ package body Sem is -- the actuals are associated with the instantiated formal. -- FIXME: do it in Instantiate_Package_Declaration ? Hdr := Get_Package_Header (Pkg); - if Sem_Generic_Association_Chain (Hdr, Decl) then - Sem_Inst.Instantiate_Package_Declaration (Decl, Pkg); - else + if not Sem_Generic_Association_Chain (Hdr, Decl) then -- FIXME: stop analysis here ? - null; + return; end if; -- FIXME: unless the parent is a package declaration library unit, the @@ -2872,6 +2870,10 @@ package body Sem is Add_Dependence (Bod); end if; end if; + + -- Instantiate the declaration after analyse of the body. So that + -- the use_flag on the declaration can be propagated to the instance. + Sem_Inst.Instantiate_Package_Declaration (Decl, Pkg); end Sem_Package_Instantiation_Declaration; -- LRM 10.4 Use Clauses. |