summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-01-01 15:28:48 -0800
committerFangrui Song <maskray@google.com>2020-01-01 15:41:20 -0800
commit681b1be774964a804beabfb7c5e3bdab8f979e4a (patch)
treee457f6923eae0dd01824870883f413765177d14b /lld/lib/ReaderWriter
parent92b68c1937cd065a2fc44d18c1099de7da19b356 (diff)
downloadbcm5719-llvm-681b1be774964a804beabfb7c5e3bdab8f979e4a.tar.gz
bcm5719-llvm-681b1be774964a804beabfb7c5e3bdab8f979e4a.zip
[lld] Fix -Wrange-loop-analysis warnings
One instance looks like a false positive: lld/ELF/Relocations.cpp:1622:14: note: use reference type 'const std::pair<ThunkSection *, uint32_t> &' (aka 'cons t pair<lld::elf::ThunkSection *, unsigned int> &') to prevent copying for (const std::pair<ThunkSection *, uint32_t> ts : isd->thunkSections) It is not changed in this commit.
Diffstat (limited to 'lld/lib/ReaderWriter')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
index 1a4603be77c..db11f73748d 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -1491,7 +1491,7 @@ void Util::addRebaseAndBindingInfo(const lld::File &atomFile,
void Util::fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset,
NormalizedFile &file) {
- for (const auto &ref : *atom) {
+ for (const Reference *ref : *atom) {
const DefinedAtom *da = dyn_cast<DefinedAtom>(ref->target());
if (da == nullptr)
return;
OpenPOWER on IntegriCloud