From f81285c0c507908b429a2c4cbd0683d624d375f9 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 16 Nov 2011 01:24:41 +0000 Subject: [PATCH] llvm-objdump: Ignore non-objects in archives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144755 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-objdump/llvm-objdump.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index d7c549299513..9071d58b0e7e 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()))