Remove all of the classof(const Value*) methods of the derived types since

the Type base class no longer derives from Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-07-04 10:48:27 +00:00
parent e753e3b329
commit 69e9abbb03

View File

@ -95,9 +95,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->isDerivedType(); return T->isDerivedType();
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -151,9 +148,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->getTypeID() == FunctionTyID; return T->getTypeID() == FunctionTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -177,9 +171,6 @@ public:
T->getTypeID() == StructTyID || T->getTypeID() == StructTyID ||
T->getTypeID() == PointerTyID; T->getTypeID() == PointerTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -232,9 +223,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->getTypeID() == StructTyID; return T->getTypeID() == StructTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -256,24 +244,14 @@ protected:
public: public:
inline const Type *getElementType() const { return ContainedTys[0]; } inline const Type *getElementType() const { return ContainedTys[0]; }
virtual bool indexValid(const Value *V) const;
/// getTypeAtIndex - Given an index value into the type, return the type of /// getTypeAtIndex - Given an index value into the type, return the type of
/// the element. For sequential types, there is only one subtype... /// the element. For sequential types, there is only one subtype...
/// ///
virtual const Type *getTypeAtIndex(const Value *V) const { virtual const Type *getTypeAtIndex(const Value *V) const {
return ContainedTys[0]; return ContainedTys[0];
} }
virtual bool indexValid(const Value *V) const {
const Type *Ty = V->getType();
switch (Ty->getTypeID()) {
case Type::IntTyID:
case Type::UIntTyID:
case Type::LongTyID:
case Type::ULongTyID:
return true;
default:
return false;
}
}
// Methods for support type inquiry through isa, cast, and dyn_cast: // Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SequentialType *T) { return true; } static inline bool classof(const SequentialType *T) { return true; }
@ -281,9 +259,6 @@ public:
return T->getTypeID() == ArrayTyID || return T->getTypeID() == ArrayTyID ||
T->getTypeID() == PointerTyID; T->getTypeID() == PointerTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -321,9 +296,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->getTypeID() == ArrayTyID; return T->getTypeID() == ArrayTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -354,9 +326,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->getTypeID() == PointerTyID; return T->getTypeID() == PointerTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
@ -393,9 +362,6 @@ public:
static inline bool classof(const Type *T) { static inline bool classof(const Type *T) {
return T->getTypeID() == OpaqueTyID; return T->getTypeID() == OpaqueTyID;
} }
static inline bool classof(const Value *V) {
return isa<Type>(V) && classof(cast<Type>(V));
}
}; };
} // End llvm namespace } // End llvm namespace