diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-09 17:59:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-09 17:59:15 +0000 |
commit | aca50a94b8d4863adf07eec980b83599c541ed99 (patch) | |
tree | f66ecabbce2895eba5867c9668c12209306f7a21 /include/llvm | |
parent | 1afcace3a3a138b1b18e5c6270caa8dae2261ae2 (diff) | |
download | external_llvm-aca50a94b8d4863adf07eec980b83599c541ed99.zip external_llvm-aca50a94b8d4863adf07eec980b83599c541ed99.tar.gz external_llvm-aca50a94b8d4863adf07eec980b83599c541ed99.tar.bz2 |
remove the DerivedType which isn't adding value anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/DerivedTypes.h | 23 | ||||
-rw-r--r-- | include/llvm/Type.h | 3 |
2 files changed, 6 insertions, 20 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index 1cefcb2..e589a4b 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -29,28 +29,15 @@ class LLVMContext; template<typename T> class ArrayRef; class StringRef; -class DerivedType : public Type { -protected: - explicit DerivedType(LLVMContext &C, TypeID id) : Type(C, id) {} -public: - - // Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const DerivedType *) { return true; } - static inline bool classof(const Type *T) { - return T->isDerivedType(); - } -}; - /// Class to represent integer types. Note that this class is also used to /// represent the built-in integer types: Int1Ty, Int8Ty, Int16Ty, Int32Ty and /// Int64Ty. /// @brief Integer representation type -class IntegerType : public DerivedType { +class IntegerType : public Type { friend class LLVMContextImpl; protected: - explicit IntegerType(LLVMContext &C, unsigned NumBits) : - DerivedType(C, IntegerTyID) { + explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){ setSubclassData(NumBits); } public: @@ -106,7 +93,7 @@ public: /// FunctionType - Class to represent function types /// -class FunctionType : public DerivedType { +class FunctionType : public Type { FunctionType(const FunctionType &); // Do not implement const FunctionType &operator=(const FunctionType &); // Do not implement FunctionType(const Type *Result, ArrayRef<Type*> Params, bool IsVarArgs); @@ -157,9 +144,9 @@ public: /// CompositeType - Common super class of ArrayType, StructType, PointerType /// and VectorType. -class CompositeType : public DerivedType { +class CompositeType : public Type { protected: - explicit CompositeType(LLVMContext &C, TypeID tid) : DerivedType(C, tid) { } + explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) { } public: /// getTypeAtIndex - Given an index value into the type, return the type of diff --git a/include/llvm/Type.h b/include/llvm/Type.h index da11d98..e4ff3e1 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -19,7 +19,6 @@ namespace llvm { -class DerivedType; class PointerType; class IntegerType; class raw_ostream; @@ -40,7 +39,7 @@ class Type { public: //===--------------------------------------------------------------------===// /// Definitions of all of the base types for the Type system. Based on this - /// value, you can cast to a "DerivedType" subclass (see DerivedTypes.h) + /// value, you can cast to a class defined in DerivedTypes.h. /// Note: If you add an element to this, you need to add an element to the /// Type::getPrimitiveType function, or else things will break! /// Also update LLVMTypeKind and LLVMGetTypeKind () in the C binding. |