aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-26 07:51:36 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-26 07:51:36 +0000
commit43276ee2803262aaa85bea23b1a100ded33b0ae9 (patch)
treed497e1102e2b7008d58d9d8ee6d2fda25b42a83f /lib
parent3d10b0b2d35be0c99fe95c6d0c4931916c8a59cf (diff)
IntegerType is a sized DerivedType too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Type.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index d1cdc5fe2e..ec7aee8031 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -139,6 +139,9 @@ unsigned Type::getPrimitiveSizeInBits() const {
/// iff all of the members of the type are sized as well. Since asking for
/// their size is relatively uncommon, move this operation out of line.
bool Type::isSizedDerivedType() const {
+ if (isa<IntegerType>(this))
+ return true;
+
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized();