summaryrefslogtreecommitdiff
path: root/translate/grt/grt-vpi.adb
diff options
context:
space:
mode:
authorgingold2005-11-22 16:09:10 +0000
committergingold2005-11-22 16:09:10 +0000
commit171548c9d708fc13f5b6d3edde30630ee04bd06e (patch)
tree181c2a4f230ec445277ec4ed6a25c73f25aab3e2 /translate/grt/grt-vpi.adb
parent20e31a50417e5452dcc5797d27dc1383253e3161 (diff)
downloadghdl-171548c9d708fc13f5b6d3edde30630ee04bd06e.tar.gz
ghdl-171548c9d708fc13f5b6d3edde30630ee04bd06e.tar.bz2
ghdl-171548c9d708fc13f5b6d3edde30630ee04bd06e.zip
more optimizations + bug fixes
Diffstat (limited to 'translate/grt/grt-vpi.adb')
-rw-r--r--translate/grt/grt-vpi.adb12
1 files changed, 8 insertions, 4 deletions
diff --git a/translate/grt/grt-vpi.adb b/translate/grt/grt-vpi.adb
index f6c5c56..f811306 100644
--- a/translate/grt/grt-vpi.adb
+++ b/translate/grt/grt-vpi.adb
@@ -48,6 +48,7 @@ with Grt.Astdio; use Grt.Astdio;
with Grt.Hooks; use Grt.Hooks;
with Grt.Vcd; use Grt.Vcd;
with Grt.Errors; use Grt.Errors;
+with Grt.Rtis_Types;
package body Grt.Vpi is
-- The VPI interface requires libdl (dlopen, dlsym) to be linked in.
@@ -57,7 +58,7 @@ package body Grt.Vpi is
--errAnyString: constant String := "grt-vcd.adb: any string" & NUL;
--errNoString: constant String := "grt-vcd.adb: no string" & NUL;
- type Vpi_Index_Type is new Natural;
+ type Vpi_Index_Type is new Integer;
-------------------------------------------------------------------------------
-- * * * h e l p e r s * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -745,12 +746,15 @@ package body Grt.Vpi is
is
Res : Integer;
begin
+ if Vpi_Filename = null then
+ return;
+ end if;
+
+ Grt.Rtis_Types.Search_Types_RTI;
+ Register_Cycle_Hook (Vpi_Cycle'Access);
if g_cbEndOfCompile /= null then
Res := g_cbEndOfCompile.Cb_Rtn.all (g_cbEndOfCompile);
end if;
- if Vpi_Filename /= null then
- Register_Cycle_Hook (Vpi_Cycle'Access);
- end if;
end Vpi_Start;
------------------------------------------------------------------------