Skip to content

Commit 8620bb9

Browse files
committed
[lld] Fix "loop variable creates a copy" warning
1 parent 8aa07f8 commit 8620bb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/COFF/Writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class DebugDirectoryChunk : public NonSectionChunk {
102102
void writeTo(uint8_t *b) const override {
103103
auto *d = reinterpret_cast<debug_directory *>(b);
104104

105-
for (const std::pair<COFF::DebugType, Chunk *> record : records) {
105+
for (const std::pair<COFF::DebugType, Chunk *>& record : records) {
106106
Chunk *c = record.second;
107107
OutputSection *os = c->getOutputSection();
108108
uint64_t offs = os->getFileOff() + (c->getRVA() - os->getRVA());

0 commit comments

Comments
 (0)