On 4.02, the OCaml unwinder otherwise gets confused and segfaults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221142
91177308-0d34-0410-b5e6-
96231b3b80d8
}
/* llbuilder -> llbasicblock */
-CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) {
+CAMLprim value llvm_insertion_block(value B) {
+ CAMLparam0();
LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
if (!InsertBlock)
- raise_not_found();
- return InsertBlock;
+ caml_raise_not_found();
+ CAMLreturn((value) InsertBlock);
}
/* llvalue -> string -> llbuilder -> unit */