Skip to content

Commit

Permalink
llvm-objdump: Ignore non-objects in archives.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144755 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Bigcheese committed Nov 16, 2011
1 parent a2a2d1f commit f81285c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/llvm-objdump/llvm-objdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit f81285c

Please sign in to comment.