diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-12-01 17:12:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-12-01 17:12:16 +0000 |
| commit | cf2e128758bc63c848c9cdf6ac3ed8ef03533236 (patch) | |
| tree | a49ae137b5324e83575ed9ec458bf6bab56a5cd2 /llvm/lib | |
| parent | 9812dbcc76425b74f998d34d6ddaab3c1885a24b (diff) | |
| download | bcm5719-llvm-cf2e128758bc63c848c9cdf6ac3ed8ef03533236.tar.gz bcm5719-llvm-cf2e128758bc63c848c9cdf6ac3ed8ef03533236.zip | |
Get GEP's working with packed types. Contributed by Morten Ofstad!
llvm-svn: 18404
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Type.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index 48fbb50f339..0496986ba0e 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<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... |

