diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index e0dc9a9fa3eace..719386e2e71fc6 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -1263,7 +1263,7 @@ static unsigned handleTlsRelocation(RelType type, Symbol &sym, template static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i, - RelTy *start, RelTy *end) { + RelTy *end) { const RelTy &rel = *i; uint32_t symIndex = rel.getSymbol(config->isMips64EL); Symbol &sym = sec.getFile()->getSymbol(symIndex); @@ -1470,7 +1470,7 @@ static void scanRelocs(InputSectionBase &sec, ArrayRef rels) { rels = sortRels(rels, storage); for (auto i = rels.begin(), end = rels.end(); i != end;) - scanReloc(sec, getOffset, i, rels.begin(), end); + scanReloc(sec, getOffset, i, end); // Sort relocations by offset for more efficient searching for // R_RISCV_PCREL_HI20 and R_PPC64_ADDR64.