1 Pull in r198385 from upstream llvm trunk (by David Blaikie):
3 Reverting r193835 due to weirdness with Go...
5 Apologies for the noise - we're seeing some Go failures with cgo
6 interacting with Clang's debug info due to this change.
8 Introduced here: http://svnweb.freebsd.org/changeset/base/261991
10 Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
11 ===================================================================
12 --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
13 +++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
14 @@ -1845,9 +1845,6 @@ void CompileUnit::constructMemberDIE(DIE &Buffer,
16 addSourceLine(MemberDie, DT);
18 - DIEBlock *MemLocationDie = new (DIEValueAllocator) DIEBlock();
19 - addUInt(MemLocationDie, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
21 if (DT.getTag() == dwarf::DW_TAG_inheritance && DT.isVirtual()) {
23 // For C++, virtual base classes are not at fixed offset. Use following
24 @@ -1892,7 +1889,11 @@ void CompileUnit::constructMemberDIE(DIE &Buffer,
26 // This is not a bitfield.
27 OffsetInBytes = DT.getOffsetInBits() >> 3;
28 - addUInt(MemberDie, dwarf::DW_AT_data_member_location, None, OffsetInBytes);
30 + DIEBlock *MemLocationDie = new (DIEValueAllocator) DIEBlock();
31 + addUInt(MemLocationDie, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
32 + addUInt(MemLocationDie, dwarf::DW_FORM_udata, OffsetInBytes);
33 + addBlock(MemberDie, dwarf::DW_AT_data_member_location, MemLocationDie);
37 Index: test/DebugInfo/X86/data_member_location.ll
38 ===================================================================
39 --- test/DebugInfo/X86/data_member_location.ll
40 +++ test/DebugInfo/X86/data_member_location.ll
43 ; CHECK: DW_AT_name {{.*}} "c"
45 -; CHECK: DW_AT_data_member_location {{.*}} (0x00)
46 +; CHECK: DW_AT_data_member_location {{.*}} (<0x02> 23 00 )
48 ; CHECK: DW_AT_name {{.*}} "i"
50 -; CHECK: DW_AT_data_member_location {{.*}} (0x04)
51 +; CHECK: DW_AT_data_member_location {{.*}} (<0x02> 23 04 )
53 %struct.foo = type { i8, i32 }
55 Index: test/DebugInfo/X86/concrete_out_of_line.ll
56 ===================================================================
57 --- test/DebugInfo/X86/concrete_out_of_line.ll
58 +++ test/DebugInfo/X86/concrete_out_of_line.ll
60 ; first check that we have a TAG_subprogram at a given offset and it has
63 -; CHECK: 0x0000011c: DW_TAG_subprogram [17]
64 +; CHECK: 0x0000011e: DW_TAG_subprogram [17]
65 ; CHECK-NEXT: DW_AT_specification
66 ; CHECK-NEXT: DW_AT_inline
70 ; and then that a TAG_subprogram refers to it with AT_abstract_origin.
72 -; CHECK: 0x0000015d: DW_TAG_subprogram [19]
73 -; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x011c => {0x0000011c})
74 +; CHECK: 0x0000015f: DW_TAG_subprogram [19]
75 +; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x011e => {0x0000011e})
77 define i32 @_ZN17nsAutoRefCnt7ReleaseEv() {
79 Index: test/DebugInfo/X86/generate-odr-hash.ll
80 ===================================================================
81 --- test/DebugInfo/X86/generate-odr-hash.ll
82 +++ test/DebugInfo/X86/generate-odr-hash.ll
84 ; REQUIRES: object-emission
86 +; Fail while investigating problem with non-block representations of member offsets.
89 ; RUN: llc %s -o %t -filetype=obj -O0 -generate-odr-hash -mtriple=x86_64-unknown-linux-gnu
90 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s