From cb72a1834f160d95d026b7e466886fd95fd82146 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 20 Apr 2020 07:49:03 +0200 Subject: types: introduce Direction_Type, which replaces Iir_Direction. Global renaming. --- src/vhdl/translate/trans-chap3.adb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 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 b0f61fe7e..ad6207658 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -3332,9 +3332,9 @@ package body Trans.Chap3 is -- Constraint is a range expression, therefore, direction is -- known. case Get_Direction (Constr) is - when Iir_To => + when Dir_To => return Gen_Compare_To; - when Iir_Downto => + when Dir_Downto => return Gen_Compare_Downto; end case; end if; @@ -3776,18 +3776,16 @@ package body Trans.Chap3 is New_Lit (Chap7.Translate_Static_Range_Dir (Range_Constr))); case Get_Direction (Range_Constr) is - when Iir_To => + when Dir_To => Op := ON_Add_Ov; - when Iir_Downto => + when Dir_Downto => Op := ON_Sub_Ov; end case; - Start_If_Stmt - (If_Blk, - New_Compare_Op (ON_Eq, - New_Obj_Value (Length), - New_Lit (Ghdl_Index_0), - Ghdl_Bool_Type)); + Start_If_Stmt (If_Blk, New_Compare_Op (ON_Eq, + New_Obj_Value (Length), + New_Lit (Ghdl_Index_0), + Ghdl_Bool_Type)); -- Null range. New_Assign_Stmt (M2Lv (Range_To_Left (Res_Range)), -- cgit v1.2.3