diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index fc82433cdcc9..2177090c0b46 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -1557,7 +1557,8 @@ SectionPiece &MergeInputSection::getSectionPiece(uint64_t offset) { if (!(flags & SHF_STRINGS)) return pieces[offset / entsize]; return partition_point( - pieces, [=](SectionPiece p) { return p.inputOff <= offset; })[-1]; + pieces, + [=](const SectionPiece &p) { return p.inputOff <= offset; })[-1]; } // Return the offset in an output section for a given input offset.