COFF: Do not ignore /merge if /debug is specified.

Previously, we ignore /merge option if /debug is specified
because I thought that was MSVC linker did. This was wrong.
/merge shouldn't be ignored even in debug mode.

llvm-svn: 243375
This commit is contained in:
Rui Ueyama 2015-07-28 03:24:23 +00:00
parent d68e211be5
commit cfb874a3d4
2 changed files with 1 additions and 3 deletions

View File

@ -168,8 +168,6 @@ void Writer::dedupCOMDATs() {
static StringRef getOutputSection(StringRef Name) {
StringRef S = Name.split('$').first;
if (Config->Debug)
return S;
auto It = Config->Merge.find(S);
if (It == Config->Merge.end())
return S;

View File

@ -1,6 +1,6 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld -flavor link2 /out:%t.exe /entry:main /subsystem:console /force \
# RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj
# RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj /debug
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
# CHECK: Name: .def