COFF: Define overloaded toString functions.
authorRui Ueyama <ruiu@google.com>
Wed, 7 Dec 2016 23:17:02 +0000 (23:17 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 7 Dec 2016 23:17:02 +0000 (23:17 +0000)
commita45d45e231a6ef811c75f4da8edb8b81cdca2841
treedaf7c64d731b6a3bf750a524d0dbeef68b7b17b5
parentd5b21b24189bc8258d3b495ae001bfdd0a6f9d03
COFF: Define overloaded toString functions.

Previously, we had different way to stringize SymbolBody and InputFile
to construct error messages. This patch defines overloaded function
toString() so that we don't need to memorize all these different
function names.

With that change, it is now easy to include demangled names in error
messages. Now, if there is a symbol name conflict, we'll print out
both mangled and demangled names.

llvm-svn: 288992
lld/COFF/CMakeLists.txt
lld/COFF/Driver.cpp
lld/COFF/InputFiles.cpp
lld/COFF/InputFiles.h
lld/COFF/Strings.cpp [new file with mode: 0644]
lld/COFF/Strings.h [new file with mode: 0644]
lld/COFF/SymbolTable.cpp
lld/COFF/Symbols.cpp
lld/COFF/Symbols.h
lld/test/COFF/conflict-mangled.test [new file with mode: 0644]
lld/test/COFF/conflict.test