diff options
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/ocaml/target/llvm_target.ml | 3 | ||||
-rw-r--r-- | bindings/ocaml/target/llvm_target.mli | 3 | ||||
-rw-r--r-- | bindings/ocaml/target/target_ocaml.c | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/bindings/ocaml/target/llvm_target.ml b/bindings/ocaml/target/llvm_target.ml index d892567092..b6a4d51ebb 100644 --- a/bindings/ocaml/target/llvm_target.ml +++ b/bindings/ocaml/target/llvm_target.ml @@ -24,7 +24,8 @@ end external byte_order : DataLayout.t -> Endian.t = "llvm_byte_order" external pointer_size : DataLayout.t -> int = "llvm_pointer_size" -external intptr_type : DataLayout.t -> Llvm.lltype = "llvm_intptr_type" +external intptr_type : DataLayout.t -> Llvm.llcontext -> Llvm.lltype + = "llvm_intptr_type" external size_in_bits : DataLayout.t -> Llvm.lltype -> Int64.t = "llvm_size_in_bits" external store_size : DataLayout.t -> Llvm.lltype -> Int64.t = "llvm_store_size" diff --git a/bindings/ocaml/target/llvm_target.mli b/bindings/ocaml/target/llvm_target.mli index f5426af1df..7c255ad4ad 100644 --- a/bindings/ocaml/target/llvm_target.mli +++ b/bindings/ocaml/target/llvm_target.mli @@ -47,7 +47,8 @@ external pointer_size : DataLayout.t -> int = "llvm_pointer_size" (** Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType. *) -external intptr_type : DataLayout.t -> Llvm.lltype = "llvm_intptr_type" +external intptr_type : DataLayout.t -> Llvm.llcontext -> Llvm.lltype + = "llvm_intptr_type" (** Computes the size of a type in bits for a target. See the method llvm::DataLayout::getTypeSizeInBits. *) 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 */ |