From: Gordon Henriksen Date: Sat, 6 Oct 2007 17:10:44 +0000 (+0000) Subject: Deleting some unnecessary glue. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=d8be2154b38ea623f2320b26c9e1a40be0d0206b Deleting some unnecessary glue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42702 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml index d1877b4659b..a460be54e6c 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 42cf002aad3..801da2614d5 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 7cb902925c9..6bccd28aea1 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));