aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-nodes.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-nodes.adb')
-rw-r--r--src/vhdl/vhdl-nodes.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb
index 40048a84f..85755105e 100644
--- a/src/vhdl/vhdl-nodes.adb
+++ b/src/vhdl/vhdl-nodes.adb
@@ -1875,6 +1875,22 @@ package body Vhdl.Nodes is
Set_Flag3 (Lit, Flag);
end Set_Has_Length;
+ function Get_Literal_Length (Lit : Iir) return Int32 is
+ begin
+ pragma Assert (Lit /= Null_Iir);
+ pragma Assert (Has_Literal_Length (Get_Kind (Lit)),
+ "no field Literal_Length");
+ return Iir_To_Int32 (Get_Field0 (Lit));
+ end Get_Literal_Length;
+
+ procedure Set_Literal_Length (Lit : Iir; Len : Int32) is
+ begin
+ pragma Assert (Lit /= Null_Iir);
+ pragma Assert (Has_Literal_Length (Get_Kind (Lit)),
+ "no field Literal_Length");
+ Set_Field0 (Lit, Int32_To_Iir (Len));
+ end Set_Literal_Length;
+
function Get_Literal_Origin (Lit : Iir) return Iir is
begin
pragma Assert (Lit /= Null_Iir);