[ELF] - Cleanup error reporting code and cover with the test. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 2 Jul 2018 14:13:11 +0000 (14:13 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 2 Jul 2018 14:13:11 +0000 (14:13 +0000)
commit03b0a4856f5861e2c2f0b2d8f03ac53c6c480789
treecd823e61611ff19e503974a96c421ebb4f865ee0
parent346856dc6c208fc103ca6838ec3a552cccad9267
[ELF] - Cleanup error reporting code and cover with the test. NFC.

We have the following code that is uncovered with the test:
https://github.com/llvm-mirror/lld/blob/master/ELF/Target.cpp#L95

This patch:
1) Removes "!IS" check. Because at that point of execution
(we are reolving the relocations during writing output)
we should only have InputSection type of the sections in the vector.
(because we already converted MergeInputSection in mergeSections()
and combined EhInputSections in combineEhFrameSections()).

2) Covers the "!IS->getParent()" with the test.

llvm-svn: 336106
lld/ELF/Target.cpp
lld/test/ELF/x86-64-reloc-error-reporting.s [new file with mode: 0644]