Change the way how we print out line numbers.
authorRui Ueyama <ruiu@google.com>
Mon, 21 Nov 2016 13:49:57 +0000 (13:49 +0000)
committerRui Ueyama <ruiu@google.com>
Mon, 21 Nov 2016 13:49:57 +0000 (13:49 +0000)
commite8785ba4d7fab0c537d381a1438dd82cb093d514
treefc1fe24de6d1fb88be17e0c2d0316cb7983ddd7d
parent68dd881697531f45b0260cb3dba56804986c8fa6
Change the way how we print out line numbers.

LLD's error messages contain line numbers, function names or section names.
Currently they are formatter as follows.

  foo.c (32): symbol 'foo' not found
  foo.c (function bar): symbol 'foo' not found
  foo.c (.text+0x1234): symbol 'foo' not found

This patch changes them so that they are consistent with Clang's output.

  foo.c:32: symbol 'foo' not found
  foo.c:(function bar): symbol 'foo' not found
  foo.c:(.text+0x1234): symbol 'foo' not found

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

llvm-svn: 287537
28 files changed:
lld/ELF/InputFiles.cpp
lld/ELF/Relocations.cpp
lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
lld/test/ELF/arm-target1.s
lld/test/ELF/basic.s
lld/test/ELF/conflict.s
lld/test/ELF/copy-errors.s
lld/test/ELF/copy-in-shared.s
lld/test/ELF/copy-rel-pie-error.s
lld/test/ELF/dynamic-reloc-in-ro.s
lld/test/ELF/eh-frame-dyn-rel.s
lld/test/ELF/libsearch.s
lld/test/ELF/linkerscript/edata-etext.s
lld/test/ELF/linkerscript/ehdr_start.s
lld/test/ELF/lto/combined-lto-object-name.ll
lld/test/ELF/relocation-relative-absolute.s
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/zdefs.s