diff options
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r-- | include/llvm/Type.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 0939d67..0bd4350 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -6,13 +6,17 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// +// This file contains the declaration of the Type class. For more "Type" +// stuff, look in DerivedTypes.h. +// +//===----------------------------------------------------------------------===// #ifndef LLVM_TYPE_H #define LLVM_TYPE_H #include "llvm/AbstractTypeUser.h" #include "llvm/Support/Casting.h" -#include "llvm/ADT/GraphTraits.h" #include <string> #include <vector> @@ -25,10 +29,8 @@ class TypeMapBase; class raw_ostream; class Module; class LLVMContext; +template<class GraphType> struct GraphTraits; -/// This file contains the declaration of the Type class. For more "Type" type -/// stuff, look in DerivedTypes.h. -/// /// The instances of the Type class are immutable: once they are created, /// they are never changed. Also note that only one instance of a particular /// type is ever created. Thus seeing if two types are equal is a matter of @@ -72,7 +74,7 @@ public: DoubleTyID, ///< 2: 64 bit floating point type X86_FP80TyID, ///< 3: 80 bit floating point type (X87) FP128TyID, ///< 4: 128 bit floating point type (112-bit mantissa) - PPC_FP128TyID, ///< 5: 128 bit floating point type (two 64-bits) + PPC_FP128TyID, ///< 5: 128 bit floating point type (two 64-bits, PowerPC) LabelTyID, ///< 6: Labels MetadataTyID, ///< 7: Metadata X86_MMXTyID, ///< 8: MMX vectors (64 bits) @@ -273,6 +275,9 @@ public: /// @brief Determine if this type could be losslessly bitcast to Ty bool canLosslesslyBitCastTo(const Type *Ty) const; + /// isEmptyTy - Return true if this type is empty, that is, it has no + /// elements or all its elements are empty. + bool isEmptyTy() const; /// Here are some useful little methods to query what type derived types are /// Note that all other types can just compare to see if this == Type::xxxTy; @@ -356,11 +361,6 @@ public: return getForwardedTypeInternal(); } - /// getVAArgsPromotedType - Return the type an argument of this type - /// will be promoted to if passed through a variable argument - /// function. - const Type *getVAArgsPromotedType(LLVMContext &C) const; - /// getScalarType - If this is a vector type, return the element type, /// otherwise return this. const Type *getScalarType() const; @@ -503,7 +503,7 @@ inline void PATypeHandle::removeUser() { /// type we are pointing to is forwarding to a new type. If so, we drop our /// reference to the type. /// -inline Type* PATypeHolder::get() const { +inline Type *PATypeHolder::get() const { if (Ty == 0) return 0; const Type *NewTy = Ty->getForwardedType(); if (!NewTy) return const_cast<Type*>(Ty); |