diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-15 19:06:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-15 19:06:42 +0200 |
commit | 626cdb38aa503ea4fdaf8cd348d112d12b9ee05b (patch) | |
tree | 9e0b1d8003395840a33487e95328aaf6451c70e5 /src | |
parent | 46ae659235e7bf1f579143f2e3869a6c2d028e5e (diff) | |
download | ghdl-626cdb38aa503ea4fdaf8cd348d112d12b9ee05b.tar.gz ghdl-626cdb38aa503ea4fdaf8cd348d112d12b9ee05b.tar.bz2 ghdl-626cdb38aa503ea4fdaf8cd348d112d12b9ee05b.zip |
trans-chap3: factorize code.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/translate/trans-chap3.adb | 12 |
1 files changed, 1 insertions, 11 deletions
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); |