summaryrefslogtreecommitdiff
path: root/iirs.adb
diff options
context:
space:
mode:
authorTristan Gingold2014-06-24 22:09:22 +0200
committerTristan Gingold2014-06-24 22:09:22 +0200
commit8b3ec6b7edf3aedbe7084609881571d1603e9621 (patch)
treede07a6cefc5f9ea045a7df4390cb95a829bddcd5 /iirs.adb
parent43c5002a7838d2b721f0b5d373ad6769293dbd6e (diff)
downloadghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.tar.gz
ghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.tar.bz2
ghdl-8b3ec6b7edf3aedbe7084609881571d1603e9621.zip
Use library unit instead of design unit.
Diffstat (limited to 'iirs.adb')
-rw-r--r--iirs.adb23
1 files changed, 15 insertions, 8 deletions
diff --git a/iirs.adb b/iirs.adb
index 68723d6..5f057ed 100644
--- a/iirs.adb
+++ b/iirs.adb
@@ -1775,14 +1775,14 @@ package body Iirs is
function Get_Architecture (Target : Iir_Entity_Aspect_Entity) return Iir is
begin
Check_Kind_For_Architecture (Target);
- return Get_Field2 (Target);
+ return Get_Field3 (Target);
end Get_Architecture;
procedure Set_Architecture (Target : Iir_Entity_Aspect_Entity; Arch : Iir)
is
begin
Check_Kind_For_Architecture (Target);
- Set_Field2 (Target, Arch);
+ Set_Field3 (Target, Arch);
end Set_Architecture;
procedure Check_Kind_For_Block_Specification (Target : Iir) is
@@ -1859,6 +1859,10 @@ package body Iirs is
| Iir_Kind_Subtype_Declaration
| Iir_Kind_Nature_Declaration
| Iir_Kind_Subnature_Declaration
+ | Iir_Kind_Configuration_Declaration
+ | Iir_Kind_Entity_Declaration
+ | Iir_Kind_Package_Declaration
+ | Iir_Kind_Architecture_Declaration
| Iir_Kind_Unit_Declaration
| Iir_Kind_Component_Declaration
| Iir_Kind_Group_Declaration
@@ -1983,13 +1987,13 @@ package body Iirs is
function Get_Entity (Decl : Iir) return Iir is
begin
Check_Kind_For_Entity (Decl);
- return Get_Field4 (Decl);
+ return Get_Field2 (Decl);
end Get_Entity;
procedure Set_Entity (Decl : Iir; Entity : Iir) is
begin
Check_Kind_For_Entity (Decl);
- Set_Field4 (Decl, Entity);
+ Set_Field2 (Decl, Entity);
end Set_Entity;
procedure Check_Kind_For_Package (Target : Iir) is
@@ -2028,13 +2032,13 @@ package body Iirs is
function Get_Package_Body (Pkg : Iir) return Iir_Package_Body is
begin
Check_Kind_For_Package_Body (Pkg);
- return Get_Field4 (Pkg);
+ return Get_Field2 (Pkg);
end Get_Package_Body;
procedure Set_Package_Body (Pkg : Iir; Decl : Iir_Package_Body) is
begin
Check_Kind_For_Package_Body (Pkg);
- Set_Field4 (Pkg, Decl);
+ Set_Field2 (Pkg, Decl);
end Set_Package_Body;
procedure Check_Kind_For_Need_Body (Target : Iir) is
@@ -3556,12 +3560,15 @@ package body Iirs is
procedure Check_Kind_For_Visible_Flag (Target : Iir) is
begin
case Get_Kind (Target) is
- when Iir_Kind_Design_Unit
- | Iir_Kind_Record_Element_Constraint
+ when Iir_Kind_Record_Element_Constraint
| Iir_Kind_Type_Declaration
| Iir_Kind_Subtype_Declaration
| Iir_Kind_Nature_Declaration
| Iir_Kind_Subnature_Declaration
+ | Iir_Kind_Configuration_Declaration
+ | Iir_Kind_Entity_Declaration
+ | Iir_Kind_Package_Declaration
+ | Iir_Kind_Architecture_Declaration
| Iir_Kind_Unit_Declaration
| Iir_Kind_Library_Declaration
| Iir_Kind_Component_Declaration