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)
commit554fd99dd569e8a2053040f16d71894ac97e0754
tree967624c24fe8c403715339f886662b4585cd6e93
parentd6e85ce3c3dad517b530fcb06c4fb20ed652a4ef
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

llvm-svn: 286607
llvm/lib/CodeGen/GlobalMerge.cpp
llvm/test/CodeGen/AArch64/global-merge-1.ll
llvm/test/CodeGen/AArch64/global-merge-2.ll
llvm/test/CodeGen/AArch64/global-merge-3.ll
llvm/test/CodeGen/AArch64/global-merge-group-by-use.ll
llvm/test/CodeGen/AArch64/global-merge-ignore-single-use-minsize.ll
llvm/test/CodeGen/AArch64/global-merge-ignore-single-use.ll
llvm/test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll
llvm/test/CodeGen/ARM/global-merge-1.ll