diff options
author | Peter Zotov <whitequark@whitequark.org> | 2014-10-29 08:15:54 +0000 |
---|---|---|
committer | Peter Zotov <whitequark@whitequark.org> | 2014-10-29 08:15:54 +0000 |
commit | 662538ac404c94ddfb92bd9def67d0e5034b45ec (patch) | |
tree | d9c72364adb81b10779fb8f900720d9518027255 /llvm/bindings/ocaml/executionengine/llvm_executionengine.ml | |
parent | e447b61c5036a7d0e3ff680ed46a9dfab33c431a (diff) | |
download | bcm5719-llvm-662538ac404c94ddfb92bd9def67d0e5034b45ec.tar.gz bcm5719-llvm-662538ac404c94ddfb92bd9def67d0e5034b45ec.zip |
[OCaml] Drop support for 3.12.1 and earlier.
In practice this means:
* Always using -g flag.
* Embedding -cclib -lstdc++ into the corresponding cma/cmxa file.
This also moves -lstdc++ in a single place.
* Using caml_named_value instead of a homegrown mechanism.
llvm-svn: 220843
Diffstat (limited to 'llvm/bindings/ocaml/executionengine/llvm_executionengine.ml')
-rw-r--r-- | llvm/bindings/ocaml/executionengine/llvm_executionengine.ml | 27 |
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 |