COFF: Stop requiring comdat sections to have an external leader to participate in...
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 20 Nov 2017 18:51:29 +0000 (18:51 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 20 Nov 2017 18:51:29 +0000 (18:51 +0000)
commitd01571353dfadbe5fb16f76b94ea591cc45f5b85
tree935dde53458055c5cba3b14e139a82b9e8890be4
parent8f54ae15a0d3f822ac834776665bf5676a7d24f7
COFF: Stop requiring comdat sections to have an external leader to participate in ICF.

This requirement was added in r254578 to fix pr25686. However, it
appears to have originated from a misdiagnosis of the problem: link.exe
refused to merge the two sections because they are non-executable,
not because they have internal leaders. If I set up a similar scenario
with functions instead of globals I see that link.exe merges them.

Differential Revision: https://reviews.llvm.org/D40236

llvm-svn: 318682
lld/COFF/ICF.cpp
lld/test/COFF/icf-executable.s [new file with mode: 0644]