Author: gordon Date: Sat Oct 6 11:05:20 2007 New Revision: 42698 URL: http://llvm.org/viewvc/llvm-project?rev=42698&view=rev Log: Adopting a uniform naming convention for type constructors in bindings.
Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c llvm/trunk/include/llvm-c/Core.h llvm/trunk/lib/VMCore/Core.cpp Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=42698&r1=42697&r2=42698&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Sat Oct 6 11:05:20 2007 @@ -74,7 +74,7 @@ /* int -> lltype */ CAMLprim LLVMTypeRef llvm_make_integer_type(value Width) { - return LLVMCreateIntType(Int_val(Width)); + return LLVMIntType(Int_val(Width)); } /* lltype -> int */ @@ -114,9 +114,9 @@ /* lltype -> lltype array -> bool -> lltype */ CAMLprim LLVMTypeRef llvm_make_function_type(LLVMTypeRef RetTy, value ParamTys, value IsVarArg) { - return LLVMCreateFunctionType(RetTy, (LLVMTypeRef *) ParamTys, - Wosize_val(ParamTys), - Bool_val(IsVarArg)); + return LLVMFunctionType(RetTy, (LLVMTypeRef *) ParamTys, + Wosize_val(ParamTys), + Bool_val(IsVarArg)); } /* lltype -> bool */ @@ -140,9 +140,9 @@ /* lltype array -> bool -> lltype */ CAMLprim LLVMTypeRef llvm_make_struct_type(value ElementTypes, value Packed) { - return LLVMCreateStructType((LLVMTypeRef *) ElementTypes, - Wosize_val(ElementTypes), - Bool_val(Packed)); + return LLVMStructType((LLVMTypeRef *) ElementTypes, + Wosize_val(ElementTypes), + Bool_val(Packed)); } /* lltype -> lltype array */ @@ -161,17 +161,17 @@ /* lltype -> int -> lltype */ CAMLprim LLVMTypeRef llvm_make_array_type(LLVMTypeRef ElementTy, value Count) { - return LLVMCreateArrayType(ElementTy, Int_val(Count)); + return LLVMArrayType(ElementTy, Int_val(Count)); } /* lltype -> lltype */ CAMLprim LLVMTypeRef llvm_make_pointer_type(LLVMTypeRef ElementTy) { - return LLVMCreatePointerType(ElementTy); + return LLVMPointerType(ElementTy); } /* lltype -> int -> lltype */ CAMLprim LLVMTypeRef llvm_make_vector_type(LLVMTypeRef ElementTy, value Count) { - return LLVMCreateVectorType(ElementTy, Int_val(Count)); + return LLVMVectorType(ElementTy, Int_val(Count)); } /* lltype -> lltype */ @@ -197,7 +197,7 @@ /* unit -> lltype */ CAMLprim LLVMTypeRef llvm_make_opaque_type(value Unit) { - return LLVMCreateOpaqueType(); + return LLVMOpaqueType(); } Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=42698&r1=42697&r2=42698&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Sat Oct 6 11:05:20 2007 @@ -164,7 +164,7 @@ LLVMTypeRef LLVMInt16Type(); LLVMTypeRef LLVMInt32Type(); LLVMTypeRef LLVMInt64Type(); -LLVMTypeRef LLVMCreateIntType(unsigned NumBits); +LLVMTypeRef LLVMIntType(unsigned NumBits); unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy); /* Operations on real types */ @@ -175,25 +175,25 @@ LLVMTypeRef LLVMPPCFP128Type(); /* Operations on function types */ -LLVMTypeRef LLVMCreateFunctionType(LLVMTypeRef ReturnType, - LLVMTypeRef *ParamTypes, unsigned ParamCount, - int IsVarArg); +LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, + LLVMTypeRef *ParamTypes, unsigned ParamCount, + int IsVarArg); int LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy); unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy); void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest); /* Operations on struct types */ -LLVMTypeRef LLVMCreateStructType(LLVMTypeRef *ElementTypes, - unsigned ElementCount, int Packed); +LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, + int Packed); unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy); void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest); int LLVMIsPackedStruct(LLVMTypeRef StructTy); /* Operations on array, pointer, and vector types (sequence types) */ -LLVMTypeRef LLVMCreateArrayType(LLVMTypeRef ElementType, unsigned ElementCount); -LLVMTypeRef LLVMCreatePointerType(LLVMTypeRef ElementType); -LLVMTypeRef LLVMCreateVectorType(LLVMTypeRef ElementType,unsigned ElementCount); +LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); +LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType); +LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy); @@ -202,7 +202,7 @@ /* Operations on other types */ LLVMTypeRef LLVMVoidType(); LLVMTypeRef LLVMLabelType(); -LLVMTypeRef LLVMCreateOpaqueType(); +LLVMTypeRef LLVMOpaqueType(); /*===-- Values ------------------------------------------------------------===*/ Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=42698&r1=42697&r2=42698&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Sat Oct 6 11:05:20 2007 @@ -68,7 +68,7 @@ LLVMTypeRef LLVMInt32Type() { return (LLVMTypeRef) Type::Int32Ty; } LLVMTypeRef LLVMInt64Type() { return (LLVMTypeRef) Type::Int64Ty; } -LLVMTypeRef LLVMCreateIntType(unsigned NumBits) { +LLVMTypeRef LLVMIntType(unsigned NumBits) { return wrap(IntegerType::get(NumBits)); } @@ -86,9 +86,9 @@ /*--.. Operations on function types ........................................--*/ -LLVMTypeRef LLVMCreateFunctionType(LLVMTypeRef ReturnType, - LLVMTypeRef *ParamTypes, unsigned ParamCount, - int IsVarArg) { +LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, + LLVMTypeRef *ParamTypes, unsigned ParamCount, + int IsVarArg) { std::vector<const Type*> Tys; for (LLVMTypeRef *I = ParamTypes, *E = ParamTypes + ParamCount; I != E; ++I) Tys.push_back(unwrap(*I)); @@ -117,8 +117,8 @@ /*--.. Operations on struct types ..........................................--*/ -LLVMTypeRef LLVMCreateStructType(LLVMTypeRef *ElementTypes, - unsigned ElementCount, int Packed) { +LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, + unsigned ElementCount, int Packed) { std::vector<const Type*> Tys; for (LLVMTypeRef *I = ElementTypes, *E = ElementTypes + ElementCount; I != E; ++I) @@ -144,15 +144,15 @@ /*--.. Operations on array, pointer, and vector types (sequence types) .....--*/ -LLVMTypeRef LLVMCreateArrayType(LLVMTypeRef ElementType, unsigned ElementCount){ +LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount){ return wrap(ArrayType::get(unwrap(ElementType), ElementCount)); } -LLVMTypeRef LLVMCreatePointerType(LLVMTypeRef ElementType) { +LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType) { return wrap(PointerType::get(unwrap(ElementType))); } -LLVMTypeRef LLVMCreateVectorType(LLVMTypeRef ElementType,unsigned ElementCount){ +LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType,unsigned ElementCount){ return wrap(VectorType::get(unwrap(ElementType), ElementCount)); } @@ -173,7 +173,7 @@ LLVMTypeRef LLVMVoidType() { return (LLVMTypeRef) Type::VoidTy; } LLVMTypeRef LLVMLabelType() { return (LLVMTypeRef) Type::LabelTy; } -LLVMTypeRef LLVMCreateOpaqueType() { +LLVMTypeRef LLVMOpaqueType() { return wrap(llvm::OpaqueType::get()); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits