From: Chris Lattner Date: Wed, 1 Dec 2004 17:12:16 +0000 (+0000) Subject: Get GEP's working with packed types. Contributed by Morten Ofstad! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0228053f8f19154f4a4466820b38465c8460efa;p=oota-llvm.git 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 --- diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 48fbb50f339..0496986ba0e 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(this)) return ATy->getElementType()->isSized(); + if (const PackedType *PTy = dyn_cast(this)) + return PTy->getElementType()->isSized(); + if (!isa(this)) return false; // Okay, our struct is sized if all of the elements are...