summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-18 22:15:47 +0000
committerChris Lattner <sabre@nondot.org>2011-06-18 22:15:47 +0000
commitea049181a020b233cfd8a33583e2784d590e1dcb (patch)
tree790508d7d7f2f13cc8f4c2ad8909b6f160eda627 /include
parentebb2189904564c7c6193e7f23904f1ced7975480 (diff)
downloadllvm-ea049181a020b233cfd8a33583e2784d590e1dcb.tar.gz
llvm-ea049181a020b233cfd8a33583e2784d590e1dcb.tar.bz2
llvm-ea049181a020b233cfd8a33583e2784d590e1dcb.tar.xz
eliminate some pointless virtual methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DerivedTypes.h33
1 files changed, 5 insertions, 28 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index 9e79339f4a..417d0418c5 100644
--- a/include/llvm/DerivedTypes.h
+++ b/include/llvm/DerivedTypes.h
@@ -205,10 +205,10 @@ public:
/// getTypeAtIndex - Given an index value into the type, return the type of
/// the element.
///
- virtual const Type *getTypeAtIndex(const Value *V) const = 0;
- virtual const Type *getTypeAtIndex(unsigned Idx) const = 0;
- virtual bool indexValid(const Value *V) const = 0;
- virtual bool indexValid(unsigned Idx) const = 0;
+ const Type *getTypeAtIndex(const Value *V) const;
+ const Type *getTypeAtIndex(unsigned Idx) const;
+ bool indexValid(const Value *V) const;
+ bool indexValid(unsigned Idx) const;
// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const CompositeType *) { return true; }
@@ -264,14 +264,6 @@ public:
return ContainedTys[N];
}
- /// getTypeAtIndex - Given an index value into the type, return the type of
- /// the element. For a structure type, this must be a constant value...
- ///
- virtual const Type *getTypeAtIndex(const Value *V) const;
- virtual const Type *getTypeAtIndex(unsigned Idx) const;
- virtual bool indexValid(const Value *V) const;
- virtual bool indexValid(unsigned Idx) const;
-
// Implement the AbstractTypeUser interface.
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
virtual void typeBecameConcrete(const DerivedType *AbsTy);
@@ -306,22 +298,7 @@ protected:
}
public:
- inline const Type *getElementType() const { return ContainedTys[0]; }
-
- virtual bool indexValid(const Value *V) const;
- virtual bool indexValid(unsigned) const {
- return true;
- }
-
- /// 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 *) const {
- return ContainedTys[0];
- }
- virtual const Type *getTypeAtIndex(unsigned) const {
- return ContainedTys[0];
- }
+ const Type *getElementType() const { return ContainedTys[0]; }
// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const SequentialType *) { return true; }