]> granicus.if.org Git - llvm/commit
Revert "Use private linkage for MergedGlobals variables" on Darwin.
authorAdrian Prantl <aprantl@apple.com>
Fri, 11 Nov 2016 17:50:09 +0000 (17:50 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 11 Nov 2016 17:50:09 +0000 (17:50 +0000)
commitec6378facd9346f09a003e9f5b1639030e0dbba9
tree4a5135d178b5ac30fddf0404166b9c6a03e31ee8
parentd22d099fffd68001fd2e9c232a04ff19124b2dcd
Revert "Use private linkage for MergedGlobals variables" on Darwin.

This is a partial revert of r244615 (http://reviews.llvm.org/D11942),
which caused a major regression in debug info quality.

Turning the artificial __MergedGlobal symbols into private symbols
(l__MergedGlobal) means that the linker will not include them in the
symbol table of the final executable. Without a symbol table entry
dsymutil is not be able to process the debug info for any of the
merged globals and thus drops the debug info for all of them.

This patch is enabling the old behavior for all MachO targets while
leaving all other targets unaffected.

rdar://problem/29160481
https://reviews.llvm.org/D26531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286607 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalMerge.cpp
test/CodeGen/AArch64/global-merge-1.ll
test/CodeGen/AArch64/global-merge-2.ll
test/CodeGen/AArch64/global-merge-3.ll
test/CodeGen/AArch64/global-merge-group-by-use.ll
test/CodeGen/AArch64/global-merge-ignore-single-use-minsize.ll
test/CodeGen/AArch64/global-merge-ignore-single-use.ll
test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll
test/CodeGen/ARM/global-merge-1.ll