Fix incorrect uses of an ocaml llbuilder without extracting it from ocaml.

llvm-svn: 97368
This commit is contained in:
Erick Tryzelaar 2010-02-28 05:51:16 +00:00
parent 5baff36f22
commit 6aacf8ecde

View File

@ -978,7 +978,7 @@ CAMLprim value llvm_position_builder(value Pos, value B) {
}
/* llbuilder -> llbasicblock */
CAMLprim LLVMBasicBlockRef llvm_insertion_block(LLVMBuilderRef B) {
CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) {
LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
if (!InsertBlock)
raise_not_found();
@ -986,9 +986,8 @@ CAMLprim LLVMBasicBlockRef llvm_insertion_block(LLVMBuilderRef B) {
}
/* llvalue -> string -> llbuilder -> unit */
CAMLprim value llvm_insert_into_builder(LLVMValueRef I, value Name,
LLVMBuilderRef B) {
LLVMInsertIntoBuilderWithName(B, I, String_val(Name));
CAMLprim value llvm_insert_into_builder(LLVMValueRef I, value Name, value B) {
LLVMInsertIntoBuilderWithName(Builder_val(B), I, String_val(Name));
return Val_unit;
}