<div dir="ltr">let me know if you need anything from the failure - a reduced test case, etc</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 27, 2015 at 2:55 PM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: adrian<br>
Date: Sat Jun 27 16:55:00 2015<br>
New Revision: 240893<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D240893-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=vM5fsug2Rd0BlSqvBVfhwwcGuAazgElgGkcsodgCzsE&s=m-b1OZpi8ZSMSnU2h2RnntawPQKXNrQUA23uQDHc29c&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=240893&view=rev</a><br>
Log:<br>
Revert "Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed"<br>
<br>
This reverts commit 240890. Breaking the gdb buildbot.<br>
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br>
llvm/trunk/test/DebugInfo/ARM/bitfield.ll<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_CodeGen_AsmPrinter_DwarfUnit.cpp-3Frev-3D240893-26r1-3D240892-26r2-3D240893-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=vM5fsug2Rd0BlSqvBVfhwwcGuAazgElgGkcsodgCzsE&s=nO-1GQm7Ldzo2SjSQuHBnILoEgYJ_tv5c8hx9fBeFXc&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=240893&r1=240892&r2=240893&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sat Jun 27 16:55:00 2015<br>
@@ -1361,29 +1361,24 @@ void DwarfUnit::constructMemberDIE(DIE &<br>
// | ... |b1|b2|b3|b4|<br>
// +-----------+-----*-----+-----*-----+--<br>
// | | |<-- Size ->| |<br>
- // |<---- Offset --->| | |<--->|<br>
- // | | | | \_ DW_AT_bit_offset (little endian)<br>
- // | |<--->| |<br>
- // |<--big-e.->| \_ StartBitOffset = DW_AT_bit_offset (big endian)<br>
- // | ^ | = DW_AT_data_bit_offset (biendian)<br>
- // | OffsetInBytes |<br>
- // | v |<br>
- // |<----little-endian---->|<br>
+ // |<---- Offset --->| |<--->|<br>
+ // | | | \_ DW_AT_bit_offset (little endian)<br>
+ // | |<--->|<br>
+ // |<--------->| \_ StartBitOffset = DW_AT_bit_offset (big endian)<br>
+ // \ = DW_AT_data_bit_offset (biendian)<br>
+ // \_ OffsetInBytes<br>
uint64_t Offset = DT->getOffsetInBits();<br>
uint64_t Align = DT->getAlignInBits() ? DT->getAlignInBits() : FieldSize;<br>
uint64_t AlignMask = ~(Align - 1);<br>
// The bits from the start of the storage unit to the start of the field.<br>
uint64_t StartBitOffset = Offset - (Offset & AlignMask);<br>
- // OffsetInBytes is the byte offset of the field's aligned storage unit<br>
- // inside the struct.<br>
- uint64_t DwarfBitOffset;<br>
- if (Asm->getDataLayout().isLittleEndian()) {<br>
- DwarfBitOffset = OffsetToAlignment(Offset + Size, Align);<br>
- OffsetInBytes = ((Offset + Size) & AlignMask) / 8;<br>
- } else {<br>
- DwarfBitOffset = StartBitOffset;<br>
- OffsetInBytes = (Offset - StartBitOffset) / 8;<br>
- }<br>
+ // The endian-dependent DWARF 2 offset.<br>
+ uint64_t DwarfBitOffset = Asm->getDataLayout().isLittleEndian()<br>
+ ? OffsetToAlignment(Offset + Size, Align)<br>
+ : StartBitOffset;<br>
+<br>
+ // The byte offset of the field's aligned storage unit inside the struct.<br>
+ OffsetInBytes = (Offset - StartBitOffset) / 8;<br>
addUInt(MemberDie, dwarf::DW_AT_bit_offset, None, DwarfBitOffset);<br>
} else<br>
// This is not a bitfield.<br>
<br>
Modified: llvm/trunk/test/DebugInfo/ARM/bitfield.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_DebugInfo_ARM_bitfield.ll-3Frev-3D240893-26r1-3D240892-26r2-3D240893-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=vM5fsug2Rd0BlSqvBVfhwwcGuAazgElgGkcsodgCzsE&s=Q4KkQ9Ud8prNQWvatN4V2aq-yC7iyVxOKUrS1yL7gQY&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/ARM/bitfield.ll?rev=240893&r1=240892&r2=240893&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/DebugInfo/ARM/bitfield.ll (original)<br>
+++ llvm/trunk/test/DebugInfo/ARM/bitfield.ll Sat Jun 27 16:55:00 2015<br>
@@ -14,7 +14,7 @@<br>
; CHECK: DW_AT_byte_size {{.*}} (0x04)<br>
; CHECK: DW_AT_bit_size {{.*}} (0x1c)<br>
; CHECK: DW_AT_bit_offset {{.*}} (0x18)<br>
-; CHECK: DW_AT_data_member_location {{.*}}04<br>
+; CHECK: DW_AT_data_member_location {{.*}}00<br>
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"<br>
target triple = "thumbv7-apple-ios"<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>