summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 05:51:16 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 05:51:16 +0000
commit628b76ecb326d104d2a00c47990c26b22ca9fd42 (patch)
tree4858444b5dc899f8a009a10ff09ffef0bfa72ce9 /bindings
parentd2b4aff4bca23ff5dadf180281a74902a18fcf73 (diff)
Fix incorrect uses of an ocaml llbuilder without extracting it from ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/llvm/llvm_ocaml.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c
index 23b74dd95d5..1e934c0e675 100644
--- a/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/bindings/ocaml/llvm/llvm_ocaml.c
@@ -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;
}