Skip to content

Commit

Permalink
[lld] Fix "loop variable creates a copy" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed Mar 17, 2020
1 parent 8aa07f8 commit 8620bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lld/COFF/Writer.cpp
Expand Up @@ -102,7 +102,7 @@ class DebugDirectoryChunk : public NonSectionChunk {
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());
Expand Down

0 comments on commit 8620bb9

Please sign in to comment.