forked from OSchip/llvm-project
Rely on the recursive check for pointer types rather than adding an
explicit check before recursing. A simplification requested by Duncan during review. llvm-svn: 163896
This commit is contained in:
parent
cabd96cbaa
commit
0cc59250d5
|
@ -2368,9 +2368,6 @@ static Type *getTypePartition(const TargetData &TD, Type *Ty,
|
||||||
if (Offset > 0 || Size < ElementSize) {
|
if (Offset > 0 || Size < ElementSize) {
|
||||||
if ((Offset + Size) > ElementSize)
|
if ((Offset + Size) > ElementSize)
|
||||||
return 0;
|
return 0;
|
||||||
// Bail if this is a poniter element, we can't recurse through them.
|
|
||||||
if (ElementTy->isPointerTy())
|
|
||||||
return 0;
|
|
||||||
return getTypePartition(TD, ElementTy, Offset, Size);
|
return getTypePartition(TD, ElementTy, Offset, Size);
|
||||||
}
|
}
|
||||||
assert(Offset == 0);
|
assert(Offset == 0);
|
||||||
|
|
Loading…
Reference in New Issue