aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iirs.adb')
-rw-r--r--src/vhdl/iirs.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb
index 6d78e9714..70fea3be9 100644
--- a/src/vhdl/iirs.adb
+++ b/src/vhdl/iirs.adb
@@ -1490,6 +1490,22 @@ package body Iirs is
Set_Field3 (We, An_Iir);
end Set_Time;
+ function Get_Choice_Position (Choice : Iir) return Int32 is
+ begin
+ pragma Assert (Choice /= Null_Iir);
+ pragma Assert (Has_Choice_Position (Get_Kind (Choice)),
+ "no field Choice_Position");
+ return Int32'Val (Get_Field1 (Choice));
+ end Get_Choice_Position;
+
+ procedure Set_Choice_Position (Choice : Iir; Pos : Int32) is
+ begin
+ pragma Assert (Choice /= Null_Iir);
+ pragma Assert (Has_Choice_Position (Get_Kind (Choice)),
+ "no field Choice_Position");
+ Set_Field1 (Choice, Int32'Pos (Pos));
+ end Set_Choice_Position;
+
function Get_Associated_Expr (Target : Iir) return Iir is
begin
pragma Assert (Target /= Null_Iir);