summaryrefslogtreecommitdiff
path: root/bindings/ocaml/target/target_ocaml.c
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2013-11-11 14:47:20 +0000
committerPeter Zotov <whitequark@whitequark.org>2013-11-11 14:47:20 +0000
commit786a43e2d8f98034046b7fd3a78d94e57a466895 (patch)
tree21861c95e9ae4fddec5e0a5078b589f9964dcf5b /bindings/ocaml/target/target_ocaml.c
parent26f3bd89660e46a76a3b0267b23b00d917a45404 (diff)
downloadllvm-786a43e2d8f98034046b7fd3a78d94e57a466895.tar.gz
llvm-786a43e2d8f98034046b7fd3a78d94e57a466895.tar.bz2
llvm-786a43e2d8f98034046b7fd3a78d94e57a466895.tar.xz
[OCaml] Accept context explicitly in Llvm_target functions
Llvm_target.intptr_type used to implicitly use global context. As none of other functions in OCaml bindings do, it is changed to accept context explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/target/target_ocaml.c')
-rw-r--r--bindings/ocaml/target/target_ocaml.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bindings/ocaml/target/target_ocaml.c b/bindings/ocaml/target/target_ocaml.c
index e457742727..46bf8dc454 100644
--- a/bindings/ocaml/target/target_ocaml.c
+++ b/bindings/ocaml/target/target_ocaml.c
@@ -72,9 +72,9 @@ CAMLprim value llvm_pointer_size(value TD) {
return Val_int(LLVMPointerSize(TargetData_val(TD)));
}
-/* DataLayout.t -> int -> Llvm.lltype */
-CAMLprim LLVMTypeRef llvm_intptr_type(value TD) {
- return LLVMIntPtrType(TargetData_val(TD));;
+/* DataLayout.t -> Llvm.llcontext -> Llvm.lltype */
+CAMLprim LLVMTypeRef llvm_intptr_type(value TD, LLVMContextRef C) {
+ return LLVMIntPtrTypeInContext(C, TargetData_val(TD));;
}
/* DataLayout.t -> Llvm.lltype -> Int64.t */