From 50a334b2d64307ca9a8224885b24a754d489f2f1 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 4 Jul 2004 10:48:27 +0000 Subject: [PATCH] Remove all of the classof(const Value*) methods of the derived types since the Type base class no longer derives from Value. llvm-svn: 14593 --- llvm/include/llvm/DerivedTypes.h | 38 ++------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/llvm/include/llvm/DerivedTypes.h b/llvm/include/llvm/DerivedTypes.h index f720562990f7..7575a4d07344 100644 --- a/llvm/include/llvm/DerivedTypes.h +++ b/llvm/include/llvm/DerivedTypes.h @@ -95,9 +95,6 @@ public: static inline bool classof(const Type *T) { return T->isDerivedType(); } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -151,9 +148,6 @@ public: static inline bool classof(const Type *T) { return T->getTypeID() == FunctionTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -177,9 +171,6 @@ public: T->getTypeID() == StructTyID || T->getTypeID() == PointerTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -232,9 +223,6 @@ public: static inline bool classof(const Type *T) { return T->getTypeID() == StructTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -256,24 +244,14 @@ protected: public: 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 /// the element. For sequential types, there is only one subtype... /// virtual const Type *getTypeAtIndex(const Value *V) const { 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: static inline bool classof(const SequentialType *T) { return true; } @@ -281,9 +259,6 @@ public: return T->getTypeID() == ArrayTyID || T->getTypeID() == PointerTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -321,9 +296,6 @@ public: static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -354,9 +326,6 @@ public: static inline bool classof(const Type *T) { return T->getTypeID() == PointerTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; @@ -393,9 +362,6 @@ public: static inline bool classof(const Type *T) { return T->getTypeID() == OpaqueTyID; } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } }; } // End llvm namespace