1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

llvm-objdump: Ignore non-objects in archives.

llvm-svn: 144755
This commit is contained in:
Michael J. Spencer 2011-11-16 01:24:41 +00:00
parent dedd750c82
commit 70bc3d6855

View File

@ -556,8 +556,10 @@ static void DumpArchive(const Archive *a) {
e = a->end_children(); i != e; ++i) {
OwningPtr<Binary> 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<ObjectFile>(child.get()))