[lld] 8620bb9 - [lld] Fix "loop variable creates a copy" warning
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 22:52:58 PDT 2020
Author: Vitaly Buka
Date: 2020-03-16T22:52:49-07:00
New Revision: 8620bb9534342176ac739e2a587e4cecf437310c
URL: https://github.com/llvm/llvm-project/commit/8620bb9534342176ac739e2a587e4cecf437310c
DIFF: https://github.com/llvm/llvm-project/commit/8620bb9534342176ac739e2a587e4cecf437310c.diff
LOG: [lld] Fix "loop variable creates a copy" warning
Added:
Modified:
lld/COFF/Writer.cpp
Removed:
################################################################################
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index bb583757cb61..7e7aaafe18ed 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -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());
More information about the llvm-commits
mailing list