printArchiveHeaders(A, !NonVerbose, ArchiveMemberOffsets);
for (Archive::child_iterator I = A->child_begin(), E = A->child_end();
I != E; ++I) {
- if (std::error_code EC = I->getError()) {
- errs() << "llvm-objdump: '" << Filename << "': " << EC.message()
- << ".\n";
- exit(1);
- }
+ if (std::error_code EC = I->getError())
+ report_error(Filename, EC);
auto &C = I->get();
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
if (ChildOrErr.getError())
for (Archive::child_iterator AI = A->child_begin(),
AE = A->child_end();
AI != AE; ++AI) {
- if (std::error_code EC = AI->getError()) {
- errs() << "llvm-objdump: '" << Filename
- << "': " << EC.message() << ".\n";
- exit(1);
- }
+ if (std::error_code EC = AI->getError())
+ report_error(Filename, EC);
auto &C = AI->get();
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
if (ChildOrErr.getError())
for (Archive::child_iterator AI = A->child_begin(),
AE = A->child_end();
AI != AE; ++AI) {
- if (std::error_code EC = AI->getError()) {
- errs() << "llvm-objdump: '" << Filename << "': " << EC.message()
- << ".\n";
- exit(1);
- }
+ if (std::error_code EC = AI->getError())
+ report_error(Filename, EC);
auto &C = AI->get();
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
if (ChildOrErr.getError())
printArchiveHeaders(A.get(), !NonVerbose, ArchiveMemberOffsets);
for (Archive::child_iterator AI = A->child_begin(), AE = A->child_end();
AI != AE; ++AI) {
- if (std::error_code EC = AI->getError()) {
- errs() << "llvm-objdump: '" << Filename << "': " << EC.message()
- << ".\n";
- exit(1);
- }
+ if (std::error_code EC = AI->getError())
+ report_error(Filename, EC);
auto &C = AI->get();
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
if (ChildOrErr.getError())