diff options
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r-- | src/vhdl/iirs_utils.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb index 5d407a3e6..f12ef8661 100644 --- a/src/vhdl/iirs_utils.adb +++ b/src/vhdl/iirs_utils.adb @@ -1054,6 +1054,21 @@ package body Iirs_Utils is return Get_Nbr_Elements (Get_Index_Subtype_List (Array_Type)); end Get_Nbr_Dimensions; + function Are_Bounds_Locally_Static (Array_Type : Iir) return Boolean + is + Indexes : constant Iir_List := Get_Index_Subtype_List (Array_Type); + Index : Iir; + begin + for I in Natural loop + Index := Get_Index_Type (Indexes, I); + exit when Index = Null_Iir; + if Get_Type_Staticness (Index) /= Locally then + return False; + end if; + end loop; + return True; + end Are_Bounds_Locally_Static; + function Get_Denoted_Type_Mark (Subtyp : Iir) return Iir is Type_Mark_Name : constant Iir := Get_Subtype_Type_Mark (Subtyp); |