summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-03-18 22:07:45 +0000
committerdim <dim@FreeBSD.org>2014-03-18 22:07:45 +0000
commitce0b21596585c6ddd828c54e5077ba0aecfae8fc (patch)
tree67bb26dee066c422ad2e624408df89bdc262af76 /contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff
parentf931c3355875cf6371ab8fbad62d0f35958db4a0 (diff)
downloadFreeBSD-src-ce0b21596585c6ddd828c54e5077ba0aecfae8fc.zip
FreeBSD-src-ce0b21596585c6ddd828c54e5077ba0aecfae8fc.tar.gz
Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. MFC after: 1 week X-MFC-With: r263313
Diffstat (limited to 'contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff')
-rw-r--r--contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff91
1 files changed, 91 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff b/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff
new file mode 100644
index 0000000..375f662
--- /dev/null
+++ b/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff
@@ -0,0 +1,91 @@
+Pull in r198385 from upstream llvm trunk (by David Blaikie):
+
+ Reverting r193835 due to weirdness with Go...
+
+ Apologies for the noise - we're seeing some Go failures with cgo
+ interacting with Clang's debug info due to this change.
+
+Introduced here: http://svn.freebsd.org/changeset/base/261991
+
+Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+===================================================================
+--- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
++++ lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+@@ -1845,9 +1845,6 @@ void CompileUnit::constructMemberDIE(DIE &Buffer,
+
+ 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
+@@ -1892,7 +1889,11 @@ void CompileUnit::constructMemberDIE(DIE &Buffer,
+ } 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: test/DebugInfo/X86/data_member_location.ll
+===================================================================
+--- test/DebugInfo/X86/data_member_location.ll
++++ test/DebugInfo/X86/data_member_location.ll
+@@ -11,11 +11,11 @@
+
+ ; 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: test/DebugInfo/X86/concrete_out_of_line.ll
+===================================================================
+--- test/DebugInfo/X86/concrete_out_of_line.ll
++++ test/DebugInfo/X86/concrete_out_of_line.ll
+@@ -7,7 +7,7 @@
+ ; 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
+
+@@ -14,8 +14,8 @@
+
+ ; 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: test/DebugInfo/X86/generate-odr-hash.ll
+===================================================================
+--- test/DebugInfo/X86/generate-odr-hash.ll
++++ test/DebugInfo/X86/generate-odr-hash.ll
+@@ -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-odr-hash -mtriple=x86_64-unknown-linux-gnu
+ ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
+ ;
OpenPOWER on IntegriCloud