diff options
-rw-r--r-- | llvm/tools/llvm-objdump/COFFDump.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/tools/llvm-objdump/COFFDump.cpp b/llvm/tools/llvm-objdump/COFFDump.cpp index e95de86f861..db549bbe3ee 100644 --- a/llvm/tools/llvm-objdump/COFFDump.cpp +++ b/llvm/tools/llvm-objdump/COFFDump.cpp @@ -177,12 +177,10 @@ resolveSectionAndAddress(const COFFObjectFile *Obj, const SymbolRef &Sym, // the function returns the symbol used for the relocation at the offset. static std::error_code resolveSymbol(const std::vector<RelocationRef> &Rels, uint64_t Offset, SymbolRef &Sym) { - for (std::vector<RelocationRef>::const_iterator I = Rels.begin(), - E = Rels.end(); - I != E; ++I) { - uint64_t Ofs = I->getOffset(); + for (auto &R : Rels) { + uint64_t Ofs = R.getOffset(); if (Ofs == Offset) { - Sym = *I->getSymbol(); + Sym = *R.getSymbol(); return std::error_code(); } } |