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
This commit is contained in:
Chris Lattner 2004-12-01 17:12:16 +00:00
parent d92017a924
commit f0228053f8

View File

@ -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...