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 /iirs_utils.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 'iirs_utils.adb')
-rw-r--r-- | iirs_utils.adb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/iirs_utils.adb b/iirs_utils.adb index 7ee171c28..fa69e8e23 100644 --- a/iirs_utils.adb +++ b/iirs_utils.adb @@ -274,6 +274,15 @@ package body Iirs_Utils is if Unit = Target then return; end if; + + case Get_Kind (Unit) is + when Iir_Kind_Design_Unit + | Iir_Kind_Entity_Aspect_Entity => + null; + when others => + Error_Kind ("add_dependence", Unit); + end case; + Add_Element (Get_Dependence_List (Target), Unit); end Add_Dependence; @@ -801,10 +810,10 @@ package body Iirs_Utils is when Iir_Kind_Component_Declaration => return Aspect; when Iir_Kind_Entity_Aspect_Entity => - return Get_Library_Unit (Get_Entity (Aspect)); + return Get_Entity (Aspect); when Iir_Kind_Entity_Aspect_Configuration => - Inst := Get_Library_Unit (Get_Configuration (Aspect)); - return Get_Library_Unit (Get_Entity (Inst)); + Inst := Get_Configuration (Aspect); + return Get_Entity (Inst); when Iir_Kind_Entity_Aspect_Open => return Null_Iir; when others => |