forked from OSchip/llvm-project
parent
74529b7d5f
commit
acf684315e
|
@ -416,7 +416,7 @@ CAMLprim value llvm_lookup_global(value Name, LLVMModuleRef M) {
|
||||||
CAMLparam1(Name);
|
CAMLparam1(Name);
|
||||||
LLVMValueRef GlobalVar;
|
LLVMValueRef GlobalVar;
|
||||||
if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) {
|
if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) {
|
||||||
value Option = caml_alloc(1, 1);
|
value Option = alloc(1, 1);
|
||||||
Field(Option, 0) = (value) GlobalVar;
|
Field(Option, 0) = (value) GlobalVar;
|
||||||
CAMLreturn(Option);
|
CAMLreturn(Option);
|
||||||
}
|
}
|
||||||
|
@ -493,7 +493,7 @@ CAMLprim value llvm_lookup_function(value Name, LLVMModuleRef M) {
|
||||||
CAMLparam1(Name);
|
CAMLparam1(Name);
|
||||||
LLVMValueRef Fn;
|
LLVMValueRef Fn;
|
||||||
if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) {
|
if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) {
|
||||||
value Option = caml_alloc(1, 1);
|
value Option = alloc(1, 1);
|
||||||
Field(Option, 0) = (value) Fn;
|
Field(Option, 0) = (value) Fn;
|
||||||
CAMLreturn(Option);
|
CAMLreturn(Option);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue