aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate/simul-execution.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-24 07:49:02 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-24 07:51:17 +0100
commit91cf6d0fbf8ab78910f74271525d9663f45e44e0 (patch)
tree03403d2bfb6b894ccad819e3d08205ccc3147dd1 /src/vhdl/simulate/simul-execution.adb
parent8982646305a71ab14057f84e80ee504c8b7d2c67 (diff)
downloadghdl-91cf6d0fbf8ab78910f74271525d9663f45e44e0.tar.gz
ghdl-91cf6d0fbf8ab78910f74271525d9663f45e44e0.tar.bz2
ghdl-91cf6d0fbf8ab78910f74271525d9663f45e44e0.zip
vhdl: move get_subprogram_body_origin to vhdl-sem_inst.
Diffstat (limited to 'src/vhdl/simulate/simul-execution.adb')
-rw-r--r--src/vhdl/simulate/simul-execution.adb19
1 files changed, 1 insertions, 18 deletions
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 =>