// isSigned - Return whether a numeric type is signed.
virtual bool isSigned() const { return 1; }
+
+ // isIntegral - Return whether this is one of the integer types
+ virtual bool isIntegral() const { return 1; }
};
class UnsignedIntType : public Type {
// isUnsigned - Return whether a numeric type is signed.
virtual bool isUnsigned() const { return 1; }
+
+ // isIntegral - Return whether this is one of the integer types
+ virtual bool isIntegral() const { return 1; }
};
static struct TypeType : public Type {
}
StructType::StructType(const vector<const Type*> &Types, const string &Name)
- : Type(Name, StructTyID), ETypes(Types) {
+ : Type(Name, StructTyID),
+ ETypes(Types),
+ layoutCache(new StructSizeAndOffsetInfo)
+{
+ ResetCachedInfo();
}
PointerType::PointerType(const Type *E)
const ArrayType *ArrayType::getArrayType(const Type *ElementType,
int NumElements = -1) {
+ assert(ElementType && "Can't get array of null types!");
static vector<const ArrayType*> ExistingTypesCache;
// Search cache for value...
const PointerType *PointerType::getPointerType(const Type *ValueType) {
+ assert(ValueType && "Can't get a pointer to <null> type!");
static vector<const PointerType*> ExistingTypesCache;
// Search cache for value...