mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Don't avoid recursing for pointer types, just reference types. Expand on
the comment. Fixes constvars.exp on the gdb test builder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -492,9 +492,10 @@ uint64_t DIDerivedType::getOriginalTypeSize() const {
|
||||
if (!BaseType.isValid())
|
||||
return getSizeInBits();
|
||||
// If this is a derived type, go ahead and get the base type, unless
|
||||
// it's a reference or pointer type, then it's just the size of the field.
|
||||
if (BaseType.getTag() == dwarf::DW_TAG_reference_type ||
|
||||
BaseType.getTag() == dwarf::DW_TAG_pointer_type)
|
||||
// it's a reference then it's just the size of the field. Pointer types
|
||||
// have no need of this since they're a different type of qualification
|
||||
// on the type.
|
||||
if (BaseType.getTag() == dwarf::DW_TAG_reference_type)
|
||||
return getSizeInBits();
|
||||
else if (BaseType.isDerivedType())
|
||||
return DIDerivedType(BaseType).getOriginalTypeSize();
|
||||
|
Reference in New Issue
Block a user