aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-02-03 07:55:09 +0100
committerTristan Gingold <tgingold@free.fr>2023-02-03 07:55:09 +0100
commitd38356d2e2213655f60ea60ef6a60af0c3c36aa0 (patch)
treee325696098351d304c039bcab04a656755a52a46 /src/vhdl/vhdl-utils.adb
parent6311bbaefc7f5ff0c4ce0092b804f2da05ded595 (diff)
downloadghdl-d38356d2e2213655f60ea60ef6a60af0c3c36aa0.tar.gz
ghdl-d38356d2e2213655f60ea60ef6a60af0c3c36aa0.tar.bz2
ghdl-d38356d2e2213655f60ea60ef6a60af0c3c36aa0.zip
vhdl: reduce use of is_anonymous_type_definition
Diffstat (limited to 'src/vhdl/vhdl-utils.adb')
-rw-r--r--src/vhdl/vhdl-utils.adb17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb
index fa5f31ee8..084e39e5a 100644
--- a/src/vhdl/vhdl-utils.adb
+++ b/src/vhdl/vhdl-utils.adb
@@ -1124,11 +1124,6 @@ package body Vhdl.Utils is
return Get_Type_Declarator (Def) = Null_Iir;
end Is_Anonymous_Type_Definition;
- function Is_Anonymous_Nature_Definition (Def : Iir) return Boolean is
- begin
- return Get_Nature_Declarator (Def) = Null_Iir;
- end Is_Anonymous_Nature_Definition;
-
function Is_Array_Type (Def : Iir) return Boolean is
begin
return Get_Kind (Def) in Iir_Kinds_Array_Type_Definition;
@@ -1337,6 +1332,18 @@ package body Vhdl.Utils is
end case;
end Is_Proper_Subtype_Indication;
+ function Is_Proper_Subnature_Indication (Def : Iir) return Boolean is
+ begin
+ case Get_Kind (Def) is
+ when Iir_Kinds_Subnature_Definition =>
+ return True;
+ when Iir_Kinds_Denoting_Name =>
+ return False;
+ when others =>
+ Error_Kind ("is_proper_subnature_indication", Def);
+ end case;
+ end Is_Proper_Subnature_Indication;
+
function Has_Owned_Subtype_Indication (Decl : Iir) return Boolean
is
Def : Iir;