COFF: Suppress "Duplicate entry" warning of lib.exe
authorRui Ueyama <ruiu@google.com>
Wed, 29 Jul 2015 22:38:27 +0000 (22:38 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 29 Jul 2015 22:38:27 +0000 (22:38 +0000)
commit966acb2e2f8485101d3bf0fc3ace2608a07b1ddc
tree4c4799f6d724eef7428418ea1d4db5014e032d60
parentdd2eb13ac411faf1eefe995783d5b601f50555b5
COFF: Suppress "Duplicate entry" warning of lib.exe

We create a module-definition file and give that to lib.exe to
create an import library file. A module-definition has to be
syntactically and semantically correct, of course.

There was a case that we created a module-definition file that
lib.exe would complain for duplicate entries. If a user gives
an unmangled and mangled name for the same symbol, we would end
up having two duplicate lines for the mangled name in a module-
definition file.

This patch fixes that issue by uniquefying entries by mangled
symbol name.

llvm-svn: 243587
lld/COFF/DriverUtils.cpp