Change the error message format for undefined symbols.
authorRui Ueyama <ruiu@google.com>
Thu, 30 Mar 2017 19:13:47 +0000 (19:13 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 30 Mar 2017 19:13:47 +0000 (19:13 +0000)
commitb87602032a3d2819190f741be871876a4f67d09f
tree2729bfec799797c89cf4fe7ab7361873a8eeaee5
parentedaec6de73aa24dee60645f0a8015ae0fe1849f3
Change the error message format for undefined symbols.

Previously, undefined symbol errors are one line like this
and wasn't easy to read.

  /ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/Writer.cpp:207: undefined symbol 'lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addSection(lld::elf::InputSectionBase*)'

This patch make it more structured like this.

  bin/ld.lld: error: undefined symbol: lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0, true>
  >>> Referenced by Writer.cpp:207 (/ssd/llvm-project/lld/ELF/Writer.cpp:207)
  >>>               Writer.cpp.o in archive lib/liblldELF.a

Discussion thread:
http://lists.llvm.org/pipermail/llvm-dev/2017-March/111459.html

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

llvm-svn: 299097
20 files changed:
lld/ELF/Error.cpp
lld/ELF/InputFiles.cpp
lld/ELF/InputFiles.h
lld/ELF/InputSection.cpp
lld/ELF/InputSection.h
lld/ELF/Relocations.cpp
lld/test/ELF/libsearch.s
lld/test/ELF/linkerscript/edata-etext.s
lld/test/ELF/linkerscript/ehdr_start.s
lld/test/ELF/lto/archive-no-index.ll
lld/test/ELF/lto/combined-lto-object-name.ll
lld/test/ELF/sysroot.s
lld/test/ELF/tls-static.s
lld/test/ELF/undef-shared.s
lld/test/ELF/undef.s
lld/test/ELF/unresolved-symbols.s
lld/test/ELF/verneed-local.s
lld/test/ELF/warn-unresolved-symbols-hidden.s
lld/test/ELF/warn-unresolved-symbols.s
lld/test/ELF/zdefs.s