mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
When computing the size of a base type be conservative if the type
is a declaration and return the size of the type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -751,8 +751,9 @@ static uint64_t getBaseTypeSize(DwarfDebug *DD, DIDerivedType Ty) {
|
||||
|
||||
DIType BaseType = DD->resolve(Ty.getTypeDerivedFrom());
|
||||
|
||||
// If this type is not derived from any type then take conservative approach.
|
||||
if (!BaseType.isValid())
|
||||
// If this type is not derived from any type or the type is a declaration then
|
||||
// take conservative approach.
|
||||
if (!BaseType.isValid() || BaseType.isForwardDecl())
|
||||
return Ty.getSizeInBits();
|
||||
|
||||
// If this is a derived type, go ahead and get the base type, unless it's a
|
||||
|
Reference in New Issue
Block a user