Reverting r193835 due to weirdness with Go...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 3 Jan 2014 00:48:38 +0000 (00:48 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 3 Jan 2014 00:48:38 +0000 (00:48 +0000)
Apologies for the noise - we're seeing some Go failures with cgo
interacting with Clang's debug info due to this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198385 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfUnit.cpp
test/DebugInfo/X86/concrete_out_of_line.ll
test/DebugInfo/X86/data_member_location.ll
test/DebugInfo/X86/generate-odr-hash.ll

index 17eb5037d4e9b94b95d39bf0e693fd34347d19a7..93df498377c349833ba322f2f37c17ab8057cda5 100644 (file)
@@ -1875,9 +1875,6 @@ void DwarfUnit::constructMemberDIE(DIE &Buffer, DIDerivedType DT) {
 
   addSourceLine(MemberDie, DT);
 
-  DIEBlock *MemLocationDie = new (DIEValueAllocator) DIEBlock();
-  addUInt(MemLocationDie, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
-
   if (DT.getTag() == dwarf::DW_TAG_inheritance && DT.isVirtual()) {
 
     // For C++, virtual base classes are not at fixed offset. Use following
@@ -1922,7 +1919,11 @@ void DwarfUnit::constructMemberDIE(DIE &Buffer, DIDerivedType DT) {
     } else
       // This is not a bitfield.
       OffsetInBytes = DT.getOffsetInBits() >> 3;
-    addUInt(MemberDie, dwarf::DW_AT_data_member_location, None, OffsetInBytes);
+
+    DIEBlock *MemLocationDie = new (DIEValueAllocator) DIEBlock();
+    addUInt(MemLocationDie, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
+    addUInt(MemLocationDie, dwarf::DW_FORM_udata, OffsetInBytes);
+    addBlock(MemberDie, dwarf::DW_AT_data_member_location, MemLocationDie);
   }
 
   if (DT.isProtected())
index 4a152963a1444124e793d62f1766e2a5e9378405..fab6793f03570c6b8361731de646f6346724fbbe 100644 (file)
@@ -7,15 +7,15 @@
 ; first check that we have a TAG_subprogram at a given offset and it has
 ; AT_inline.
 
-; CHECK: 0x0000011c:   DW_TAG_subprogram [17]
+; CHECK: 0x0000011e:   DW_TAG_subprogram [17]
 ; CHECK-NEXT:     DW_AT_specification
 ; CHECK-NEXT:     DW_AT_inline
 
 
 ; and then that a TAG_subprogram refers to it with AT_abstract_origin.
 
-; CHECK: 0x0000015d:   DW_TAG_subprogram [19]
-; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4]    (cu + 0x011c => {0x0000011c})
+; CHECK: 0x0000015f:   DW_TAG_subprogram [19]
+; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4]    (cu + 0x011e => {0x0000011e})
 
 define i32 @_ZN17nsAutoRefCnt7ReleaseEv() {
 entry:
index 1adddb97be25153f2ac200b6280b6a3c1f0b2398..a619d82ae3c62d82bdd5a0117d68d5e87715258a 100644 (file)
 
 ; CHECK: DW_AT_name {{.*}} "c"
 ; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_data_member_location {{.*}} (0x00)
+; CHECK: DW_AT_data_member_location {{.*}} (<0x02> 23 00 )
 
 ; CHECK: DW_AT_name {{.*}} "i"
 ; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_data_member_location {{.*}} (0x04)
+; CHECK: DW_AT_data_member_location {{.*}} (<0x02> 23 04 )
 
 %struct.foo = type { i8, i32 }
 
index 28c4295826d5036d5bda07e905e1a99450300203..a66533cdeb51be676712728682fbc69add66b3e5 100644 (file)
@@ -1,5 +1,8 @@
 ; REQUIRES: object-emission
 
+; Fail while investigating problem with non-block representations of member offsets.
+; XFAIL: *
+
 ; RUN: llc %s -o %t -filetype=obj -O0 -generate-type-units -generate-odr-hash -mtriple=x86_64-unknown-linux-gnu
 ; RUN: llvm-dwarfdump %t | FileCheck %s