C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gordon Henriksen
2007-12-23 16:59:28 +00:00
parent efbcebc95d
commit 2e855e68d8
12 changed files with 1031 additions and 12 deletions

View File

@@ -18,7 +18,6 @@
#include "llvm-c/Core.h"
#include "caml/alloc.h"
#include "caml/custom.h"
#include "caml/mlvalues.h"
#include "caml/memory.h"
#include "caml/fail.h"
#include "caml/callback.h"
@@ -37,7 +36,7 @@ CAMLprim value llvm_register_core_exns(value IoError) {
return Val_unit;
}
void llvm_raise(value Prototype, char *Message) {
static void llvm_raise(value Prototype, char *Message) {
CAMLparam1(Prototype);
CAMLlocal1(CamlMessage);
@@ -45,6 +44,7 @@ void llvm_raise(value Prototype, char *Message) {
LLVMDisposeMessage(Message);
raise_with_arg(Prototype, CamlMessage);
abort(); /* NOTREACHED */
CAMLnoreturn;
}
@@ -234,7 +234,7 @@ CAMLprim LLVMTypeRef llvm_opaque_type(value Unit) {
#define Typehandle_val(v) (*(LLVMTypeHandleRef *)(Data_custom_val(v)))
void llvm_finalize_handle(value TH) {
static void llvm_finalize_handle(value TH) {
LLVMDisposeTypeHandle(Typehandle_val(TH));
}