Uniformize the names of type predicates: rather than having isFloatTy and

isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2010-02-15 16:12:20 +00:00
parent f6814754e8
commit b0bc6c361d
50 changed files with 381 additions and 377 deletions

View File

@@ -214,46 +214,46 @@ public:
/// getDescription - Return the string representation of the type.
std::string getDescription() const;
/// isInteger - True if this is an instance of IntegerType.
/// isIntegerTy - True if this is an instance of IntegerType.
///
bool isInteger() const { return ID == IntegerTyID; }
bool isIntegerTy() const { return ID == IntegerTyID; }
/// isInteger - Return true if this is an IntegerType of the specified width.
bool isInteger(unsigned Bitwidth) const;
/// isIntegerTy - Return true if this is an IntegerType of the given width.
bool isIntegerTy(unsigned Bitwidth) const;
/// isIntOrIntVector - Return true if this is an integer type or a vector of
/// isIntOrIntVectorTy - Return true if this is an integer type or a vector of
/// integer types.
///
bool isIntOrIntVector() const;
bool isIntOrIntVectorTy() const;
/// isFloatingPoint - Return true if this is one of the five floating point
/// isFloatingPointTy - Return true if this is one of the five floating point
/// types
bool isFloatingPoint() const { return ID == FloatTyID || ID == DoubleTyID ||
bool isFloatingPointTy() const { return ID == FloatTyID || ID == DoubleTyID ||
ID == X86_FP80TyID || ID == FP128TyID || ID == PPC_FP128TyID; }
/// isFPOrFPVector - Return true if this is a FP type or a vector of FP types.
/// isFPOrFPVectorTy - Return true if this is a FP type or a vector of FP.
///
bool isFPOrFPVector() const;
bool isFPOrFPVectorTy() const;
/// isFunction - True if this is an instance of FunctionType.
/// isFunctionTy - True if this is an instance of FunctionType.
///
bool isFunction() const { return ID == FunctionTyID; }
bool isFunctionTy() const { return ID == FunctionTyID; }
/// isStruct - True if this is an instance of StructType.
/// isStructTy - True if this is an instance of StructType.
///
bool isStruct() const { return ID == StructTyID; }
bool isStructTy() const { return ID == StructTyID; }
/// isArray - True if this is an instance of ArrayType.
/// isArrayTy - True if this is an instance of ArrayType.
///
bool isArray() const { return ID == ArrayTyID; }
bool isArrayTy() const { return ID == ArrayTyID; }
/// isPointer - True if this is an instance of PointerType.
/// isPointerTy - True if this is an instance of PointerType.
///
bool isPointer() const { return ID == PointerTyID; }
bool isPointerTy() const { return ID == PointerTyID; }
/// isVector - True if this is an instance of VectorType.
/// isVectorTy - True if this is an instance of VectorType.
///
bool isVector() const { return ID == VectorTyID; }
bool isVectorTy() const { return ID == VectorTyID; }
/// isAbstract - True if the type is either an Opaque type, or is a derived
/// type that includes an opaque type somewhere in it.
@@ -307,7 +307,7 @@ public:
///
bool isSized() const {
// If it's a primitive, it is always sized.
if (ID == IntegerTyID || isFloatingPoint() || ID == PointerTyID)
if (ID == IntegerTyID || isFloatingPointTy() || ID == PointerTyID)
return true;
// If it is not something that can have a size (e.g. a function or label),
// it doesn't have a size.