mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-17 08:57:34 +00:00
Need to walk the derived chain of typedefs to get actual size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d472ad7c7c
commit
ee5f9274b9
@ -1539,10 +1539,19 @@ private:
|
||||
uint64_t FieldAlign = Align;
|
||||
uint64_t FieldOffset = Offset;
|
||||
|
||||
if (TypeDesc *FromTy = MemberDesc->getFromType()) {
|
||||
AddType(Member, FromTy, Unit);
|
||||
FieldSize = FromTy->getSize();
|
||||
FieldAlign = FromTy->getSize();
|
||||
// Set the member type.
|
||||
TypeDesc *FromTy = MemberDesc->getFromType();
|
||||
AddType(Member, FromTy, Unit);
|
||||
|
||||
// Walk up typedefs until a real size is found.
|
||||
while (FromTy) {
|
||||
if (FromTy->getTag() != DW_TAG_typedef) {
|
||||
FieldSize = FromTy->getSize();
|
||||
FieldAlign = FromTy->getSize();
|
||||
break;
|
||||
}
|
||||
|
||||
FromTy = dyn_cast<DerivedTypeDesc>(FromTy)->getFromType();
|
||||
}
|
||||
|
||||
// Unless we have a bit field.
|
||||
|
Loading…
Reference in New Issue
Block a user