This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Refactor several fatal error messages
ClosedPublic

Authored by evgeny777 on Nov 22 2016, 6:07 AM.

Details

Summary

This patch does the following:

  • Adds ":" in string returned by getName(), so that error messages conform the current style
  • Puts file name before error message
  • Prints location for non-ABS reloc error and adds test case for it.

Diff Detail

Repository
rL LLVM

Event Timeline

evgeny777 updated this revision to Diff 78862.Nov 22 2016, 6:07 AM
evgeny777 retitled this revision from to [ELF] Refactor several fatal error messages.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
ruiu accepted this revision.Nov 22 2016, 8:27 AM
ruiu edited edge metadata.

LGTM

ELF/InputFiles.cpp
784 ↗(On Diff #78862)

This should be llvm_unreachable.

This revision is now accepted and ready to land.Nov 22 2016, 8:27 AM
evgeny777 added inline comments.Nov 23 2016, 2:10 AM
ELF/InputFiles.cpp
784 ↗(On Diff #78862)

This is checked in ELF/invalid/invalid-elf.text

This revision was automatically updated to reflect the committed changes.