diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-06-24 22:09:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-06-24 22:09:22 +0200 |
commit | 8b3ec6b7edf3aedbe7084609881571d1603e9621 (patch) | |
tree | de07a6cefc5f9ea045a7df4390cb95a829bddcd5 /libraries.adb | |
parent | 43c5002a7838d2b721f0b5d373ad6769293dbd6e (diff) | |
download | ghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.tar.gz ghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.tar.bz2 ghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.zip |
Use library unit instead of design unit.
Diffstat (limited to 'libraries.adb')
-rw-r--r-- | libraries.adb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libraries.adb b/libraries.adb index 91dd27d90..e48707d8e 100644 --- a/libraries.adb +++ b/libraries.adb @@ -148,7 +148,7 @@ package body Libraries is -- Architectures are put with the entity identifier. Id := Get_Identifier (Get_Entity (Lib_Unit)); when others => - Error_Kind ("get_id_for_unit_hash", Lib_Unit); + Error_Kind ("get_Hash_Id_For_Unit", Lib_Unit); end case; return Id mod Unit_Hash_Length; end Get_Hash_Id_For_Unit; @@ -503,7 +503,6 @@ package body Libraries is end if; Set_Identifier (Library_Unit, Current_Identifier); Set_Identifier (Design_Unit, Current_Identifier); - Set_Visible_Flag (Design_Unit, True); if Get_Kind (Library_Unit) = Iir_Kind_Architecture_Declaration then Scan_Expect (Tok_Of); @@ -1390,16 +1389,9 @@ package body Libraries is return Find_Primary_Unit (Lib, Get_Suffix_Identifier (Unit)); end; when Iir_Kind_Entity_Aspect_Entity => - declare - Prim : Iir_Design_Unit; - begin - Prim := Find_Design_Unit (Get_Entity (Unit)); - if Prim = Null_Iir then - return Null_Iir; - end if; - return Find_Secondary_Unit - (Prim, Get_Identifier (Get_Architecture (Unit))); - end; + return Find_Secondary_Unit + (Get_Design_Unit (Get_Entity (Unit)), + Get_Identifier (Get_Architecture (Unit))); when others => Error_Kind ("find_design_unit", Unit); end case; |