Adopting a uniform naming convention for type constructors in bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gordon Henriksen 2007-10-06 16:05:20 +00:00
parent e3b989d4a4
commit 81a788176e
3 changed files with 31 additions and 31 deletions

View File

@ -74,7 +74,7 @@ CAMLprim LLVMTypeRef llvm_i64_type(value Unit) { return LLVMInt64Type(); }
/* 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 @@ CAMLprim LLVMTypeRef llvm_ppc_fp128_type(value Unit) {
/* 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 @@ CAMLprim value llvm_param_types(LLVMTypeRef FunTy) {
/* 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 @@ CAMLprim value llvm_is_packed(LLVMTypeRef StructTy) {
/* 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 @@ CAMLprim LLVMTypeRef llvm_label_type(value Unit) { return LLVMLabelType(); }
/* unit -> lltype */
CAMLprim LLVMTypeRef llvm_make_opaque_type(value Unit) {
return LLVMCreateOpaqueType();
return LLVMOpaqueType();
}

View File

@ -164,7 +164,7 @@ LLVMTypeRef LLVMInt8Type();
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 LLVMFP128Type();
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 @@ unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy);
/* Operations on other types */
LLVMTypeRef LLVMVoidType();
LLVMTypeRef LLVMLabelType();
LLVMTypeRef LLVMCreateOpaqueType();
LLVMTypeRef LLVMOpaqueType();
/*===-- Values ------------------------------------------------------------===*/

View File

@ -68,7 +68,7 @@ LLVMTypeRef LLVMInt16Type() { return (LLVMTypeRef) Type::Int16Ty; }
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 @@ LLVMTypeRef LLVMPPCFP128Type() { return (LLVMTypeRef) Type::PPC_FP128Ty; }
/*--.. 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 @@ 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) {
std::vector<const Type*> Tys;
for (LLVMTypeRef *I = ElementTypes,
*E = ElementTypes + ElementCount; I != E; ++I)
@ -144,15 +144,15 @@ int LLVMIsPackedStruct(LLVMTypeRef StructTy) {
/*--.. 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 @@ unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy) {
LLVMTypeRef LLVMVoidType() { return (LLVMTypeRef) Type::VoidTy; }
LLVMTypeRef LLVMLabelType() { return (LLVMTypeRef) Type::LabelTy; }
LLVMTypeRef LLVMCreateOpaqueType() {
LLVMTypeRef LLVMOpaqueType() {
return wrap(llvm::OpaqueType::get());
}