diff options
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/ocaml/llvm/llvm.ml | 6 | ||||
-rw-r--r-- | bindings/ocaml/llvm/llvm.mli | 6 | ||||
-rw-r--r-- | bindings/ocaml/llvm/llvm_ocaml.c | 15 |
3 files changed, 6 insertions, 21 deletions
diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml index d1877b4..a460be5 100644 --- a/bindings/ocaml/llvm/llvm.ml +++ b/bindings/ocaml/llvm/llvm.ml @@ -150,7 +150,7 @@ external function_type : lltype -> lltype array -> lltype = "llvm_function_type" external var_arg_function_type : lltype -> lltype array -> lltype = "llvm_var_arg_function_type" external is_var_arg : lltype -> bool = "llvm_is_var_arg" -external return_type : lltype -> lltype = "llvm_return_type" +external return_type : lltype -> lltype = "LLVMGetReturnType" external param_types : lltype -> lltype array = "llvm_param_types" (*--... Operations on struct types .........................................--*) @@ -161,10 +161,10 @@ external is_packed : lltype -> bool = "llvm_is_packed" (*--... Operations on pointer, vector, and array types .....................--*) external array_type : lltype -> int -> lltype = "llvm_array_type" -external pointer_type : lltype -> lltype = "llvm_pointer_type" +external pointer_type : lltype -> lltype = "LLVMPointerType" external vector_type : lltype -> int -> lltype = "llvm_vector_type" -external element_type : lltype -> lltype = "llvm_element_type" +external element_type : lltype -> lltype = "LLVMGetElementType" external array_length : lltype -> int = "llvm_array_length" external vector_size : lltype -> int = "llvm_vector_size" diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index 42cf002..801da26 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -137,7 +137,7 @@ external function_type : lltype -> lltype array -> lltype = "llvm_function_type" external var_arg_function_type : lltype -> lltype array -> lltype = "llvm_var_arg_function_type" external is_var_arg : lltype -> bool = "llvm_is_var_arg" -external return_type : lltype -> lltype = "llvm_return_type" +external return_type : lltype -> lltype = "LLVMGetReturnType" external param_types : lltype -> lltype array = "llvm_param_types" (*--... Operations on struct types .........................................--*) @@ -148,10 +148,10 @@ external is_packed : lltype -> bool = "llvm_is_packed" (*--... Operations on pointer, vector, and array types .....................--*) external array_type : lltype -> int -> lltype = "llvm_array_type" -external pointer_type : lltype -> lltype = "llvm_pointer_type" +external pointer_type : lltype -> lltype = "LLVMPointerType" external vector_type : lltype -> int -> lltype = "llvm_vector_type" -external element_type : lltype -> lltype = "llvm_element_type" +external element_type : lltype -> lltype = "LLVMGetElementType" external array_length : lltype -> int = "llvm_array_length" external vector_size : lltype -> int = "llvm_vector_size" diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index 7cb9029..6bccd28 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -129,11 +129,6 @@ CAMLprim value llvm_is_var_arg(LLVMTypeRef FunTy) { return Val_bool(LLVMIsFunctionVarArg(FunTy)); } -/* lltype -> lltype */ -CAMLprim LLVMTypeRef llvm_return_type(LLVMTypeRef FunTy) { - return LLVMGetReturnType(FunTy); -} - /* lltype -> lltype array */ CAMLprim value llvm_param_types(LLVMTypeRef FunTy) { value Tys = alloc(LLVMCountParamTypes(FunTy), 0); @@ -174,21 +169,11 @@ CAMLprim LLVMTypeRef llvm_array_type(LLVMTypeRef ElementTy, value Count) { return LLVMArrayType(ElementTy, Int_val(Count)); } -/* lltype -> lltype */ -CAMLprim LLVMTypeRef llvm_pointer_type(LLVMTypeRef ElementTy) { - return LLVMPointerType(ElementTy); -} - /* lltype -> int -> lltype */ CAMLprim LLVMTypeRef llvm_vector_type(LLVMTypeRef ElementTy, value Count) { return LLVMVectorType(ElementTy, Int_val(Count)); } -/* lltype -> lltype */ -CAMLprim LLVMTypeRef llvm_element_type(LLVMTypeRef Ty) { - return LLVMGetElementType(Ty); -} - /* lltype -> int */ CAMLprim value llvm_array_length(LLVMTypeRef ArrayTy) { return Val_int(LLVMGetArrayLength(ArrayTy)); |