[lld] Fix "loop variable creates a copy" warning

This commit is contained in:
Vitaly Buka 2020-03-16 22:51:48 -07:00
parent 8aa07f81b8
commit 8620bb9534
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public:
void writeTo(uint8_t *b) const override {
auto *d = reinterpret_cast<debug_directory *>(b);
for (const std::pair<COFF::DebugType, Chunk *> record : records) {
for (const std::pair<COFF::DebugType, Chunk *>& record : records) {
Chunk *c = record.second;
OutputSection *os = c->getOutputSection();
uint64_t offs = os->getFileOff() + (c->getRVA() - os->getRVA());