diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-24 19:17:27 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-24 19:17:27 +0200 |
commit | 0aba06b92bf72e6870ee690a26eca485c2e74714 (patch) | |
tree | 0d297c05692ed72118945197124208aa2ec397ad /src/vhdl/sem_specs.adb | |
parent | 1fbf1e9fc8455d8c675cc80818d1a2cdeaccdcb8 (diff) | |
download | ghdl-0aba06b92bf72e6870ee690a26eca485c2e74714.tar.gz ghdl-0aba06b92bf72e6870ee690a26eca485c2e74714.tar.bz2 ghdl-0aba06b92bf72e6870ee690a26eca485c2e74714.zip |
sem_specs: use architecture body for entity_aspect_entity when loaded.
Diffstat (limited to 'src/vhdl/sem_specs.adb')
-rw-r--r-- | src/vhdl/sem_specs.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb index cb7f945f1..8d0eb03a8 100644 --- a/src/vhdl/sem_specs.adb +++ b/src/vhdl/sem_specs.adb @@ -1056,6 +1056,7 @@ package body Sem_Specs is Arch_Name : Iir; Arch_Unit : Iir; begin + -- The entity. Entity_Name := Sem_Denoting_Name (Get_Entity_Name (Aspect)); Set_Entity_Name (Aspect, Entity_Name); Entity := Get_Named_Entity (Entity_Name); @@ -1073,8 +1074,13 @@ package body Sem_Specs is if Arch_Name /= Null_Iir then Arch_Unit := Libraries.Find_Secondary_Unit (Get_Design_Unit (Entity), Get_Identifier (Arch_Name)); - Set_Named_Entity (Arch_Name, Arch_Unit); if Arch_Unit /= Null_Iir then + -- The architecture is known. + if Get_Date_State (Arch_Unit) >= Date_Parse then + -- And loaded! + Arch_Unit := Get_Library_Unit (Arch_Unit); + end if; + Set_Named_Entity (Arch_Name, Arch_Unit); Xref_Ref (Arch_Name, Arch_Unit); end if; |