aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-01 17:12:16 +0000
committerChris Lattner <sabre@nondot.org>2004-12-01 17:12:16 +0000
commitf0228053f8f19154f4a4466820b38465c8460efa (patch)
treeffe0da6bf1da98e9972a4623b5dc7306c645b1e7 /lib
parentd92017a924390b74f377ca5e7877204b88d1f5a6 (diff)
Get GEP's working with packed types. Contributed by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18404 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 48fbb50f33..0496986ba0 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -151,6 +151,9 @@ bool Type::isSizedDerivedType() const {
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized();
+ if (const PackedType *PTy = dyn_cast<PackedType>(this))
+ return PTy->getElementType()->isSized();
+
if (!isa<StructType>(this)) return false;
// Okay, our struct is sized if all of the elements are...