Fixed downrev Ocaml compatibility.

llvm-svn: 42744
This commit is contained in:
Gordon Henriksen 2007-10-08 12:16:59 +00:00
parent ffcd82d1ed
commit 739a5252cb

View File

@ -416,7 +416,7 @@ CAMLprim value llvm_lookup_global(value Name, LLVMModuleRef M) {
CAMLparam1(Name);
LLVMValueRef GlobalVar;
if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) {
value Option = caml_alloc(1, 1);
value Option = alloc(1, 1);
Field(Option, 0) = (value) GlobalVar;
CAMLreturn(Option);
}
@ -493,7 +493,7 @@ CAMLprim value llvm_lookup_function(value Name, LLVMModuleRef M) {
CAMLparam1(Name);
LLVMValueRef Fn;
if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) {
value Option = caml_alloc(1, 1);
value Option = alloc(1, 1);
Field(Option, 0) = (value) Fn;
CAMLreturn(Option);
}