git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282982
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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();
}
}