aboutsummaryrefslogtreecommitdiffstats
path: root/iirs_utils.adb
diff options
context:
space:
mode:
Diffstat (limited to 'iirs_utils.adb')
-rw-r--r--iirs_utils.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/iirs_utils.adb b/iirs_utils.adb
index 060c3f74e..178f90ef3 100644
--- a/iirs_utils.adb
+++ b/iirs_utils.adb
@@ -549,6 +549,19 @@ package body Iirs_Utils is
or else Get_Constraint_State (Def) = Fully_Constrained;
end Is_Fully_Constrained_Type;
+ function Get_Type_Of_Type_Mark (Mark : Iir) return Iir is
+ begin
+ case Get_Kind (Mark) is
+ when Iir_Kind_Type_Declaration =>
+ return Get_Type_Definition (Mark);
+ when Iir_Kind_Subtype_Declaration
+ | Iir_Kind_Base_Attribute =>
+ return Get_Type (Mark);
+ when others =>
+ Error_Kind ("get_type_of_type_mark", Mark);
+ end case;
+ end Get_Type_Of_Type_Mark;
+
function Is_Same_Profile (L, R: Iir) return Boolean
is
L1, R1 : Iir;
@@ -890,7 +903,6 @@ package body Iirs_Utils is
and then Get_Generic_Map_Aspect_Chain (Header) /= Null_Iir;
end Is_Generic_Mapped_Package;
-
function Get_HDL_Node (N : PSL_Node) return Iir is
begin
return Iir (PSL.Nodes.Get_HDL_Node (N));