aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-nodes.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-28 06:36:57 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-28 06:36:57 +0200
commitc24ef07771e91f11206f88d3c912941f942f4e4b (patch)
tree0e06e2872d12d830609a18368c86cf3e5ee5aac1 /src/vhdl/vhdl-nodes.adb
parent67422d11f9c5f4d8c97c10daf1a5e0d58d2b2df8 (diff)
downloadghdl-c24ef07771e91f11206f88d3c912941f942f4e4b.tar.gz
ghdl-c24ef07771e91f11206f88d3c912941f942f4e4b.tar.bz2
ghdl-c24ef07771e91f11206f88d3c912941f942f4e4b.zip
vhdl: get rid of Get/Set_Physical_Unit.
Use integer_literal for evaluated physical literals.
Diffstat (limited to 'src/vhdl/vhdl-nodes.adb')
-rw-r--r--src/vhdl/vhdl-nodes.adb20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb
index 7a532c113..40048a84f 100644
--- a/src/vhdl/vhdl-nodes.adb
+++ b/src/vhdl/vhdl-nodes.adb
@@ -5253,28 +5253,12 @@ package body Vhdl.Nodes is
Set_Field4 (Target, An_Iir);
end Set_Right;
- function Get_Physical_Unit (Lit : Iir) return Iir is
- begin
- pragma Assert (Lit /= Null_Iir);
- pragma Assert (Has_Physical_Unit (Get_Kind (Lit)),
- "no field Physical_Unit");
- return Get_Field3 (Lit);
- end Get_Physical_Unit;
-
- procedure Set_Physical_Unit (Lit : Iir; Name : Iir) is
- begin
- pragma Assert (Lit /= Null_Iir);
- pragma Assert (Has_Physical_Unit (Get_Kind (Lit)),
- "no field Physical_Unit");
- Set_Field3 (Lit, Name);
- end Set_Physical_Unit;
-
function Get_Unit_Name (Target : Iir) return Iir is
begin
pragma Assert (Target /= Null_Iir);
pragma Assert (Has_Unit_Name (Get_Kind (Target)),
"no field Unit_Name");
- return Get_Field0 (Target);
+ return Get_Field3 (Target);
end Get_Unit_Name;
procedure Set_Unit_Name (Target : Iir; Name : Iir) is
@@ -5282,7 +5266,7 @@ package body Vhdl.Nodes is
pragma Assert (Target /= Null_Iir);
pragma Assert (Has_Unit_Name (Get_Kind (Target)),
"no field Unit_Name");
- Set_Field0 (Target, Name);
+ Set_Field3 (Target, Name);
end Set_Unit_Name;
function Get_Name (Target : Iir) return Iir is