diff options
author | Devang Patel <dpatel@apple.com> | 2009-11-04 23:48:00 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-11-04 23:48:00 +0000 |
commit | 61ecbd196c0128abb8c588aebc456ed96cdf1d63 (patch) | |
tree | eb31eeaf714c6f88187105ff5599823148f53936 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 4371cda7f8fc21fc3192ead122ba48b0152fb0e4 (diff) |
While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
This improves bitfield support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index dc4c9096ab..1372fc2168 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1141,9 +1141,7 @@ DIE *DwarfDebug::CreateMemberDIE(CompileUnit *DW_Unit, const DIDerivedType &DT){ AddUInt(MemLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst); uint64_t Size = DT.getSizeInBits(); - uint64_t FieldSize = Size; - if (DT.getTypeDerivedFrom().getTag() != dwarf::DW_TAG_array_type) - FieldSize = DT.getOriginalTypeSize(); + uint64_t FieldSize = DT.getOriginalTypeSize(); if (Size != FieldSize) { // Handle bitfield. |