summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.h
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-11-16 22:17:38 +0000
committerKevin Enderby <enderby@apple.com>2016-11-16 22:17:38 +0000
commit7fa40c9f2b176fde3f99a96f6eb952f590f9d694 (patch)
treeb1d5119d313da96bd74f11c7741247741ad89a6c /llvm/tools/llvm-objdump/llvm-objdump.h
parenta789f400022f4941e00142d2299e2ca0df695c63 (diff)
downloadbcm5719-llvm-7fa40c9f2b176fde3f99a96f6eb952f590f9d694.tar.gz
bcm5719-llvm-7fa40c9f2b176fde3f99a96f6eb952f590f9d694.zip
General clean up of error handling in llvm-objdump to remove its use of report_fatal_error().
No real functional change with this commit. The problem with report_fatal_error() is it does not include the tool name and the file name the for which the error message was generated. Uses of report_fatal_error() were change to report_error() or error() to get a better error and to make the code smaller and cleaner. Also changed things like error(errorToErrorCode(SOrErr.takeError())) to use report_error() with a file name and the llvm::Error (as well as the ArchitectureName if available) so the error message is printed. llvm-svn: 287163
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.h')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.h b/llvm/tools/llvm-objdump/llvm-objdump.h
index 85ad0bbe26c..c87ef2deb22 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.h
+++ b/llvm/tools/llvm-objdump/llvm-objdump.h
@@ -91,6 +91,7 @@ void PrintSectionContents(const object::ObjectFile *o);
void PrintSymbolTable(const object::ObjectFile *o, StringRef ArchiveName,
StringRef ArchitectureName = StringRef());
LLVM_ATTRIBUTE_NORETURN void error(Twine Message);
+LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, Twine Message);
LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, std::error_code EC);
LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, llvm::Error E);
LLVM_ATTRIBUTE_NORETURN void report_error(StringRef FileName,
OpenPOWER on IntegriCloud