summaryrefslogtreecommitdiff
path: root/include/llvm/DerivedTypes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-12 22:11:53 +0000
committerChris Lattner <sabre@nondot.org>2007-01-12 22:11:53 +0000
commita82d4078502b7cfcaa553dbf845c948a99f05ab5 (patch)
tree201ef4f0a7b04a9708f7c466105d264165779ae7 /include/llvm/DerivedTypes.h
parentbcaae8d8a4840343af0243104ac62b4a4c320316 (diff)
downloadllvm-a82d4078502b7cfcaa553dbf845c948a99f05ab5.tar.gz
llvm-a82d4078502b7cfcaa553dbf845c948a99f05ab5.tar.bz2
llvm-a82d4078502b7cfcaa553dbf845c948a99f05ab5.tar.xz
inline isIntegral to make this method look like classof for all other
derived types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DerivedTypes.h')
-rw-r--r--include/llvm/DerivedTypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index 78759f1dea..ccef4cbeab 100644
--- a/include/llvm/DerivedTypes.h
+++ b/include/llvm/DerivedTypes.h
@@ -103,7 +103,9 @@ public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntegerType *T) { return true; }
- static inline bool classof(const Type *T) { return T->isIntegral(); }
+ static inline bool classof(const Type *T) {
+ return T->getTypeID() == IntegerTyID;
+ }
};