llvm.org GIT mirror llvm / 89a66f4
[OCaml] Fix mismatched CAMLparam/CAMLreturn. Also, revert r221142--it was an incorrect fix to this bug which fixed tests by accident. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221149 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Zotov 4 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
749749 if (LLVMIsAConstantFP(Const)) {
750750 Result = LLVMConstRealGetDouble(Const, &LosesInfo);
751751 if (LosesInfo)
752 return Val_int(0);
752 CAMLreturn(Val_int(0));
753753
754754 Option = alloc(1, 0);
755755 Field(Option, 0) = caml_copy_double(Result);
15891589 }
15901590
15911591 /* llbuilder -> llbasicblock */
1592 CAMLprim value llvm_insertion_block(value B) {
1593 CAMLparam0();
1592 CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) {
15941593 LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
15951594 if (!InsertBlock)
15961595 caml_raise_not_found();
1597 CAMLreturn((value) InsertBlock);
1596 return InsertBlock;
15981597 }
15991598
16001599 /* llvalue -> string -> llbuilder -> unit */