summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cxxdump
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-07-14 00:37:04 +0000
committerLang Hames <lhames@gmail.com>2016-07-14 00:37:04 +0000
commitae610ab528a382a393aae26d2d67cee05cabe634 (patch)
treebb4178e75d234c71dac75810b4662a0f979227f0 /llvm/tools/llvm-cxxdump
parent7f781aba9755633c53210db02d51f6f56d11ea48 (diff)
downloadbcm5719-llvm-ae610ab528a382a393aae26d2d67cee05cabe634.tar.gz
bcm5719-llvm-ae610ab528a382a393aae26d2d67cee05cabe634.zip
[Object] Revert r275316, Archive::child_iterator changes, while I update lld.
Should fix the bots broken by r275316. llvm-svn: 275353
Diffstat (limited to 'llvm/tools/llvm-cxxdump')
-rw-r--r--llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp b/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
index c92d20d6ccf..0c408ccb5ba 100644
--- a/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
+++ b/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
@@ -50,14 +50,6 @@ static void error(std::error_code EC) {
exit(1);
}
-static void error(Error Err) {
- if (Err) {
- logAllUnhandledErrors(std::move(Err), outs(), "Error reading file: ");
- outs().flush();
- exit(1);
- }
-}
-
} // namespace llvm
static void reportError(StringRef Input, StringRef Message) {
@@ -490,8 +482,9 @@ static void dumpCXXData(const ObjectFile *Obj) {
}
static void dumpArchive(const Archive *Arc) {
- Error Err;
- for (auto &ArcC : Arc->children(Err)) {
+ for (auto &ErrorOrChild : Arc->children()) {
+ error(ErrorOrChild.getError());
+ const Archive::Child &ArcC = *ErrorOrChild;
Expected<std::unique_ptr<Binary>> ChildOrErr = ArcC.getAsBinary();
if (!ChildOrErr) {
// Ignore non-object files.
@@ -511,7 +504,6 @@ static void dumpArchive(const Archive *Arc) {
else
reportError(Arc->getFileName(), cxxdump_error::unrecognized_file_format);
}
- error(std::move(Err));
}
static void dumpInput(StringRef File) {
OpenPOWER on IntegriCloud