From 91cf6d0fbf8ab78910f74271525d9663f45e44e0 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 24 Mar 2020 07:49:02 +0100 Subject: vhdl: move get_subprogram_body_origin to vhdl-sem_inst. --- src/vhdl/simulate/simul-execution.adb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/vhdl/simulate/simul-execution.adb') diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb index d7391ef95..a70d920c7 100644 --- a/src/vhdl/simulate/simul-execution.adb +++ b/src/vhdl/simulate/simul-execution.adb @@ -3311,23 +3311,6 @@ package body Simul.Execution is Unshare (Val, Instance_Pool); end Execute_Monadic_Association; - -- Like Get_Subprogram_Body, but also works for instances, where - -- instantiated nodes have no bodies. - -- FIXME: maybe fix the issue directly in Sem_Inst ? - function Get_Subprogram_Body_Origin (Spec : Iir) return Iir - is - Res : constant Iir := Get_Subprogram_Body (Spec); - Orig : Iir; - begin - if Res /= Null_Iir then - return Res; - else - Orig := Vhdl.Sem_Inst.Get_Origin (Spec); - pragma Assert (Orig /= Null_Iir); - return Get_Subprogram_Body_Origin (Orig); - end if; - end Get_Subprogram_Body_Origin; - -- Like Get_Protected_Type_Body, but also works for instances, where -- instantiated nodes have no bodies. -- FIXME: maybe fix the issue directly in Sem_Inst ? @@ -3360,7 +3343,7 @@ package body Simul.Execution is begin case Get_Kind (Imp) is when Iir_Kinds_Subprogram_Declaration => - Bod := Get_Subprogram_Body_Origin (Imp); + Bod := Vhdl.Sem_Inst.Get_Subprogram_Body_Origin (Imp); Parent := Get_Parent (Imp); Label := Get_Subprogram_Specification (Bod); when Iir_Kind_Protected_Type_Declaration => -- cgit v1.2.3