From cf2e128758bc63c848c9cdf6ac3ed8ef03533236 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 1 Dec 2004 17:12:16 +0000 Subject: [PATCH] Get GEP's working with packed types. Contributed by Morten Ofstad! llvm-svn: 18404 --- llvm/lib/VMCore/Type.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index 48fbb50f339a..0496986ba0e7 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/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...