From 8a3f67db595be25637b4edc65f18138b48ccdac6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 12 Jun 2015 08:03:24 +0200 Subject: ortho: allow selected element from an union. Minor cleanups. --- src/vhdl/translate/trans-chap3.adb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/vhdl/translate') diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index a6ba4c9..bc82209 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -1979,8 +1979,7 @@ package body Trans.Chap3 is end Handle_Anonymous_Subtypes; -- Note: boolean types are translated by translate_bool_type_definition! - procedure Translate_Type_Definition - (Def : Iir; With_Vars : Boolean := True) + procedure Translate_Type_Definition (Def : Iir; With_Vars : Boolean := True) is Info : Ortho_Info_Acc; Base_Info : Type_Info_Acc; @@ -2264,10 +2263,9 @@ package body Trans.Chap3 is procedure Translate_Anonymous_Type_Definition (Def : Iir; Transient : Boolean) is + Type_Info : constant Type_Info_Acc := Get_Info (Def); Mark : Id_Mark_Type; - Type_Info : Type_Info_Acc; begin - Type_Info := Get_Info (Def); if Type_Info /= null then return; end if; @@ -2282,11 +2280,10 @@ package body Trans.Chap3 is procedure Translate_Object_Subtype (Decl : Iir; With_Vars : Boolean := True) is + Def : constant Iir := Get_Type (Decl); Mark : Id_Mark_Type; Mark2 : Id_Mark_Type; - Def : Iir; begin - Def := Get_Type (Decl); if Is_Anonymous_Type_Definition (Def) then Push_Identifier_Prefix (Mark, Get_Identifier (Decl)); Push_Identifier_Prefix (Mark2, "OT"); -- cgit