[llvm] r243905 - [llvm-objdump] Range-loopify. NFC intended.
Davide Italiano
davide at freebsd.org
Mon Aug 3 14:46:32 PDT 2015
Author: davide
Date: Mon Aug 3 16:46:32 2015
New Revision: 243905
URL: http://llvm.org/viewvc/llvm-project?rev=243905&view=rev
Log:
[llvm-objdump] Range-loopify. NFC intended.
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=243905&r1=243904&r2=243905&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Mon Aug 3 16:46:32 2015
@@ -1521,9 +1521,8 @@ static void DumpObject(const ObjectFile
/// @brief Dump each object file in \a a;
static void DumpArchive(const Archive *a) {
- for (Archive::child_iterator i = a->child_begin(), e = a->child_end(); i != e;
- ++i) {
- ErrorOr<std::unique_ptr<Binary>> ChildOrErr = i->getAsBinary();
+ for (const Archive::Child &C : a->children()) {
+ ErrorOr<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
if (std::error_code EC = ChildOrErr.getError()) {
// Ignore non-object files.
if (EC != object_error::invalid_file_type)
More information about the llvm-commits
mailing list