Remove module providers from ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97609 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Erick Tryzelaar
2010-03-02 23:59:00 +00:00
parent df7df075b7
commit 16609f3c5c
13 changed files with 87 additions and 140 deletions

View File

@@ -64,9 +64,8 @@ let test_executionengine () =
let m2 = create_module (global_context ()) "test_module2" in
define_plus m2;
let ee = ExecutionEngine.create (ModuleProvider.create m) in
let mp2 = ModuleProvider.create m2 in
ExecutionEngine.add_module_provider mp2 ee;
let ee = ExecutionEngine.create m in
ExecutionEngine.add_module m2 ee;
(* run_static_ctors *)
ExecutionEngine.run_static_ctors ee;
@@ -94,8 +93,8 @@ let test_executionengine () =
ee in
if 4 != GenericValue.as_int res then bomb "plus did not work";
(* remove_module_provider *)
Llvm.dispose_module (ExecutionEngine.remove_module_provider mp2 ee);
(* remove_module *)
Llvm.dispose_module (ExecutionEngine.remove_module m2 ee);
(* run_static_dtors *)
ExecutionEngine.run_static_dtors ee;