summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitdfa957746ca48d86787cb99df2fb0c1d66906126 (patch)
tree0189c3b7234245c4fd945c30650e2db399033ce5 /llvm/bindings/ocaml/target/target_ocaml.c
parentd52cf175844393043cc59e250cf391e641158314 (diff)
downloadbcm5719-llvm-dfa957746ca48d86787cb99df2fb0c1d66906126.tar.gz
bcm5719-llvm-dfa957746ca48d86787cb99df2fb0c1d66906126.zip
[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. llvm-svn: 194381
Diffstat (limited to 'llvm/bindings/ocaml/target/target_ocaml.c')
-rw-r--r--llvm/bindings/ocaml/target/target_ocaml.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/bindings/ocaml/target/target_ocaml.c b/llvm/bindings/ocaml/target/target_ocaml.c
index e4577427278..46bf8dc4548 100644
--- a/llvm/bindings/ocaml/target/target_ocaml.c
+++ b/llvm/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 */
OpenPOWER on IntegriCloud