diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index d7c54929951..9071d58b0e7 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -556,8 +556,10 @@ static void DumpArchive(const Archive *a) { e = a->end_children(); i != e; ++i) { OwningPtr child; if (error_code ec = i->getAsBinary(child)) { - errs() << ToolName << ": '" << a->getFileName() << "': " << ec.message() - << ".\n"; + // Ignore non-object files. + if (ec != object_error::invalid_file_type) + errs() << ToolName << ": '" << a->getFileName() << "': " << ec.message() + << ".\n"; continue; } if (ObjectFile *o = dyn_cast(child.get()))