diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-02-21 17:05:19 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-02-21 17:05:19 +0000 |
commit | ad29d29130a62f71bc0b00e8743f5fb6e1e41258 (patch) | |
tree | 5b4d99389cd313ff69493e4730a4e1aaabb2898b /llvm/tools/llvm-objcopy/CopyConfig.h | |
parent | 1ed3a0467c93817f669ece91bf008e3997e98230 (diff) | |
download | bcm5719-llvm-ad29d29130a62f71bc0b00e8743f5fb6e1e41258.tar.gz bcm5719-llvm-ad29d29130a62f71bc0b00e8743f5fb6e1e41258.zip |
[llvm-objcopy][NFC] More error cleanup
Summary:
This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors.
There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost!
Reviewers: jhenderson, alexshap, espindola
Reviewed By: jhenderson
Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58316
llvm-svn: 354600
Diffstat (limited to 'llvm/tools/llvm-objcopy/CopyConfig.h')
-rw-r--r-- | llvm/tools/llvm-objcopy/CopyConfig.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.h b/llvm/tools/llvm-objcopy/CopyConfig.h index f1d5cf2c10c..7dc60bcc843 100644 --- a/llvm/tools/llvm-objcopy/CopyConfig.h +++ b/llvm/tools/llvm-objcopy/CopyConfig.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" +#include "llvm/Support/Error.h" #include "llvm/Support/Regex.h" // Necessary for llvm::DebugCompressionType::None #include "llvm/Target/TargetOptions.h" @@ -131,12 +132,12 @@ struct DriverConfig { // ParseObjcopyOptions returns the config and sets the input arguments. If a // help flag is set then ParseObjcopyOptions will print the help messege and // exit. -DriverConfig parseObjcopyOptions(ArrayRef<const char *> ArgsArr); +Expected<DriverConfig> parseObjcopyOptions(ArrayRef<const char *> ArgsArr); // ParseStripOptions returns the config and sets the input arguments. If a // help flag is set then ParseStripOptions will print the help messege and // exit. -DriverConfig parseStripOptions(ArrayRef<const char *> ArgsArr); +Expected<DriverConfig> parseStripOptions(ArrayRef<const char *> ArgsArr); } // namespace objcopy } // namespace llvm |