[llvm-branch-commits] [llvm-branch] r86901 - /llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Bill Wendling
isanbard at gmail.com
Wed Nov 11 15:42:38 PST 2009
Author: void
Date: Wed Nov 11 17:42:38 2009
New Revision: 86901
URL: http://llvm.org/viewvc/llvm-project?rev=86901&view=rev
Log:
$ svn merge -c 86054 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r86054 into '.':
U lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified:
llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=86901&r1=86900&r2=86901&view=diff
==============================================================================
--- llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/branches/Apple/Leela-M1/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Nov 11 17:42:38 2009
@@ -1137,6 +1137,9 @@
AddSourceLine(MemberDie, &DT);
+ DIEBlock *MemLocationDie = new DIEBlock();
+ AddUInt(MemLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
+
uint64_t Size = DT.getSizeInBits();
uint64_t FieldSize = DT.getOriginalTypeSize();
@@ -1155,12 +1158,16 @@
// Maybe we need to work from the other end.
if (TD->isLittleEndian()) Offset = FieldSize - (Offset + Size);
AddUInt(MemberDie, dwarf::DW_AT_bit_offset, 0, Offset);
- }
- DIEBlock *Block = new DIEBlock();
- AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
- AddUInt(Block, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits() >> 3);
- AddBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, Block);
+ // Here WD_AT_data_member_location points to the anonymous
+ // field that includes this bit field.
+ AddUInt(MemLocationDie, 0, dwarf::DW_FORM_udata, FieldOffset >> 3);
+
+ } else
+ // This is not a bitfield.
+ AddUInt(MemLocationDie, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits() >> 3);
+
+ AddBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, MemLocationDie);
if (DT.isProtected())
AddUInt(MemberDie, dwarf::DW_AT_accessibility, 0,
More information about the llvm-branch-commits
mailing list