[llvm-objdump] - Cleanup the error reporting.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 21 Aug 2019 11:07:31 +0000 (11:07 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 21 Aug 2019 11:07:31 +0000 (11:07 +0000)
commitf0f38d9b9deea950659756ddd490c6673199e4aa
treecef89ff401156ea39c0664d21dc25f844c96a56f
parent65c58a902d00d8523cbe55d6218ba8d23b6dd185
[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

llvm-svn: 369515
13 files changed:
llvm/test/Object/macho-invalid.test
llvm/test/tools/llvm-objdump/X86/disassemble-functions-mangling.test
llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test
llvm/test/tools/llvm-objdump/X86/source-interleave-missing-source.test
llvm/test/tools/llvm-objdump/X86/source-interleave-no-debug-info.test
llvm/test/tools/llvm-objdump/X86/start-stop-address.test
llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
llvm/test/tools/llvm-objdump/warn-on-out-of-range-start-stop-address.test
llvm/tools/llvm-objdump/COFFDump.cpp
llvm/tools/llvm-objdump/ELFDump.cpp
llvm/tools/llvm-objdump/MachODump.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-objdump/llvm-objdump.h