forked from OSchip/llvm-project
[OCaml] Fix mismatched CAMLparam/CAMLreturn.
Also, revert r221142--it was an incorrect fix to this bug which fixed tests by accident. llvm-svn: 221149
This commit is contained in:
parent
164acd5e2d
commit
2fdec7d71a
|
|
@ -750,7 +750,7 @@ CAMLprim value llvm_float_of_const(LLVMValueRef Const)
|
||||||
if (LLVMIsAConstantFP(Const)) {
|
if (LLVMIsAConstantFP(Const)) {
|
||||||
Result = LLVMConstRealGetDouble(Const, &LosesInfo);
|
Result = LLVMConstRealGetDouble(Const, &LosesInfo);
|
||||||
if (LosesInfo)
|
if (LosesInfo)
|
||||||
return Val_int(0);
|
CAMLreturn(Val_int(0));
|
||||||
|
|
||||||
Option = alloc(1, 0);
|
Option = alloc(1, 0);
|
||||||
Field(Option, 0) = caml_copy_double(Result);
|
Field(Option, 0) = caml_copy_double(Result);
|
||||||
|
|
@ -1590,12 +1590,11 @@ CAMLprim value llvm_position_builder(value Pos, value B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* llbuilder -> llbasicblock */
|
/* llbuilder -> llbasicblock */
|
||||||
CAMLprim value llvm_insertion_block(value B) {
|
CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) {
|
||||||
CAMLparam0();
|
|
||||||
LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
|
LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
|
||||||
if (!InsertBlock)
|
if (!InsertBlock)
|
||||||
caml_raise_not_found();
|
caml_raise_not_found();
|
||||||
CAMLreturn((value) InsertBlock);
|
return InsertBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* llvalue -> string -> llbuilder -> unit */
|
/* llvalue -> string -> llbuilder -> unit */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue