[llvm-commits] [llvm] r144755 - /llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Tue Nov 15 17:24:41 PST 2011
Author: mspencer
Date: Tue Nov 15 19:24:41 2011
New Revision: 144755
URL: http://llvm.org/viewvc/llvm-project?rev=144755&view=rev
Log:
llvm-objdump: Ignore non-objects in archives.
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=144755&r1=144754&r2=144755&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Tue Nov 15 19:24:41 2011
@@ -556,8 +556,10 @@
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()))
More information about the llvm-commits
mailing list