mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-11 15:26:07 +00:00
If a type is derived from a derived type then calculate size appropriately.
llvm-svn: 85619
This commit is contained in:
parent
88539d92a3
commit
2b9d1ade65
@ -398,10 +398,10 @@ bool DIVariable::Verify() const {
|
|||||||
/// getOriginalTypeSize - If this type is derived from a base type then
|
/// getOriginalTypeSize - If this type is derived from a base type then
|
||||||
/// return base type size.
|
/// return base type size.
|
||||||
uint64_t DIDerivedType::getOriginalTypeSize() const {
|
uint64_t DIDerivedType::getOriginalTypeSize() const {
|
||||||
if (getTag() != dwarf::DW_TAG_member)
|
|
||||||
return getSizeInBits();
|
|
||||||
DIType BT = getTypeDerivedFrom();
|
DIType BT = getTypeDerivedFrom();
|
||||||
if (BT.getTag() != dwarf::DW_TAG_base_type)
|
if (!BT.isNull() && BT.isDerivedType())
|
||||||
|
return DIDerivedType(BT.getNode()).getOriginalTypeSize();
|
||||||
|
if (BT.isNull())
|
||||||
return getSizeInBits();
|
return getSizeInBits();
|
||||||
return BT.getSizeInBits();
|
return BT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user