From 626cdb38aa503ea4fdaf8cd348d112d12b9ee05b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 15 May 2020 19:06:42 +0200 Subject: trans-chap3: factorize code. --- src/vhdl/translate/trans-chap3.adb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/vhdl/translate/trans-chap3.adb') diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index d52a95726..a360c26dc 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -2539,17 +2539,7 @@ package body Trans.Chap3 is if Is_Anonymous_Type_Definition (Def) then Push_Identifier_Prefix (Mark, Get_Identifier (Decl)); Push_Identifier_Prefix (Mark2, "OT"); - Parent_Type := Get_Subtype_Type_Mark (Def); - if Parent_Type /= Null_Iir then - Parent_Type := Get_Type (Get_Named_Entity (Parent_Type)); - else - Parent_Type := Get_Base_Type (Def); - -- Parent_Type should be integer_type_definition for iterators, - -- or the subtype indication for constant (in the case the - -- default value constrains the subtype indication), or an - -- object alias, or anywhere because of 'Subtype applied on one - -- of the above object... - end if; + Parent_Type := Get_Parent_Type (Def); Chap3.Translate_Subtype_Definition (Def, Parent_Type, With_Vars); Pop_Identifier_Prefix (Mark2); Pop_Identifier_Prefix (Mark); -- cgit v1.2.3