forked from OSchip/llvm-project
Get GEP's working with packed types. Contributed by Morten Ofstad!
llvm-svn: 18404
This commit is contained in:
parent
9812dbcc76
commit
cf2e128758
|
|
@ -151,6 +151,9 @@ bool Type::isSizedDerivedType() const {
|
||||||
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
|
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
|
||||||
return ATy->getElementType()->isSized();
|
return ATy->getElementType()->isSized();
|
||||||
|
|
||||||
|
if (const PackedType *PTy = dyn_cast<PackedType>(this))
|
||||||
|
return PTy->getElementType()->isSized();
|
||||||
|
|
||||||
if (!isa<StructType>(this)) return false;
|
if (!isa<StructType>(this)) return false;
|
||||||
|
|
||||||
// Okay, our struct is sized if all of the elements are...
|
// Okay, our struct is sized if all of the elements are...
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue