summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/ocaml/executionengine/llvm_executionengine.ml
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/bindings/ocaml/executionengine/llvm_executionengine.ml')
-rw-r--r--llvm/bindings/ocaml/executionengine/llvm_executionengine.ml27
1 files changed, 8 insertions, 19 deletions
diff --git a/llvm/bindings/ocaml/executionengine/llvm_executionengine.ml b/llvm/bindings/ocaml/executionengine/llvm_executionengine.ml
index 2165533c137..f61195337ca 100644
--- a/llvm/bindings/ocaml/executionengine/llvm_executionengine.ml
+++ b/llvm/bindings/ocaml/executionengine/llvm_executionengine.ml
@@ -1,4 +1,4 @@
-(*===-- llvm_executionengine.ml - LLVM OCaml Interface ----------*- C++ -*-===*
+(*===-- llvm_executionengine.ml - LLVM OCaml Interface --------*- OCaml -*-===*
*
* The LLVM Compiler Infrastructure
*
@@ -7,21 +7,18 @@
*
*===----------------------------------------------------------------------===*)
-
exception Error of string
-external register_exns: exn -> unit
- = "llvm_register_ee_exns"
-
+let () = Callback.register_exception "Llvm_executionengine.Error" (Error "")
module CodeModel = struct
type t =
- | Default
- | JIT_default
- | Small
- | Kernel
- | Medium
- | Large
+ | Default
+ | JIT_default
+ | Small
+ | Kernel
+ | Medium
+ | Large
end
module GenericValue = struct
@@ -71,14 +68,6 @@ module ExecutionEngine = struct
no_framepointer_elim = false;
enable_fast_isel = false }
- (* FIXME: Ocaml is not running this setup code unless we use 'val' in the
- interface, which causes the emission of a stub for each function;
- using 'external' in the module allows direct calls into
- ocaml_executionengine.c. This is hardly fatal, but it is unnecessary
- overhead on top of the two stubs that are already invoked for each
- call into LLVM. *)
- let _ = register_exns (Error "")
-
external create: Llvm.llmodule -> t
= "llvm_ee_create"
external create_interpreter: Llvm.llmodule -> t
OpenPOWER on IntegriCloud