summaryrefslogtreecommitdiff
path: root/src/vhdl/iir_chains.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iir_chains.adb')
-rw-r--r--src/vhdl/iir_chains.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vhdl/iir_chains.adb b/src/vhdl/iir_chains.adb
index ef47b64..d6d944f 100644
--- a/src/vhdl/iir_chains.adb
+++ b/src/vhdl/iir_chains.adb
@@ -36,6 +36,7 @@ package body Iir_Chains is
procedure Sub_Chain_Append (First, Last : in out Iir; El : Iir) is
begin
+ pragma Assert (El /= Null_Iir);
if First = Null_Iir then
First := El;
else
@@ -44,6 +45,18 @@ package body Iir_Chains is
Last := El;
end Sub_Chain_Append;
+ procedure Sub_Chain_Append_Chain (First, Last : in out Iir;
+ First_Sub, Last_Sub : Iir) is
+ begin
+ pragma Assert (First_Sub /= Null_Iir);
+ if First = Null_Iir then
+ First := First_Sub;
+ else
+ Set_Chain (Last, First_Sub);
+ end if;
+ Last := Last_Sub;
+ end Sub_Chain_Append_Chain;
+
function Is_Chain_Length_One (Chain : Iir) return Boolean is
begin
return Chain /= Null_Iir and then Get_Chain (Chain) = Null_Iir;