[llvm-objdump] - Cleanup the error reporting.
commitddf7fe28fc876df29dec5db2c44003cf32254024
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 21 Aug 2019 11:07:31 +0000 (21 11:07 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 21 Aug 2019 11:07:31 +0000 (21 11:07 +0000)
treedbb2a73689ae077dd9245b31b617fdfd24865f36
parentb0dc323179daf9d76d0b8e38c4eb5d9301adf5c9
[llvm-objdump] - Cleanup the error reporting.

The error reporting function are not consistent.

Before this change:

* They had inconsistent naming (e.g. 'error' vs 'report_error').
* Some of them reported the object name, others - dont.
* Some of them accepted the case when there was no error. (i.e. error code or Error had a success value).

This patch tries to cleanup it a bit.

It also renames report_error -> reportError, report_warning -> reportWarning
and removes a full stop from messages.

Differential revision: https://reviews.llvm.org/D66418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369515 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
test/Object/macho-invalid.test
test/tools/llvm-objdump/X86/disassemble-functions-mangling.test
test/tools/llvm-objdump/X86/source-interleave-invalid-source.test
test/tools/llvm-objdump/X86/source-interleave-missing-source.test
test/tools/llvm-objdump/X86/source-interleave-no-debug-info.test
test/tools/llvm-objdump/X86/start-stop-address.test
test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
tools/llvm-objdump/COFFDump.cpp
tools/llvm-objdump/ELFDump.cpp
tools/llvm-objdump/MachODump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-objdump/llvm-objdump.h