diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /llvm/lib/DebugInfo/DWARF | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp index 875f5e9989a..575edba51ee 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp @@ -277,7 +277,7 @@ Optional<DWARFFormValue> AppleAcceleratorTable::Entry::lookup(HeaderData::AtomType Atom) const { assert(HdrData && "Dereferencing end iterator?"); assert(HdrData->Atoms.size() == Values.size()); - for (const auto &Tuple : zip_first(HdrData->Atoms, Values)) { + for (auto Tuple : zip_first(HdrData->Atoms, Values)) { if (std::get<0>(Tuple).first == Atom) return std::get<1>(Tuple); } @@ -531,7 +531,7 @@ DWARFDebugNames::Entry::Entry(const NameIndex &NameIdx, const Abbrev &Abbr) Optional<DWARFFormValue> DWARFDebugNames::Entry::lookup(dwarf::Index Index) const { assert(Abbr->Attributes.size() == Values.size()); - for (const auto &Tuple : zip_first(Abbr->Attributes, Values)) { + for (auto Tuple : zip_first(Abbr->Attributes, Values)) { if (std::get<0>(Tuple).Index == Index) return std::get<1>(Tuple); } @@ -565,7 +565,7 @@ void DWARFDebugNames::Entry::dump(ScopedPrinter &W) const { W.printHex("Abbrev", Abbr->Code); W.startLine() << formatv("Tag: {0}\n", Abbr->Tag); assert(Abbr->Attributes.size() == Values.size()); - for (const auto &Tuple : zip_first(Abbr->Attributes, Values)) { + for (auto Tuple : zip_first(Abbr->Attributes, Values)) { W.startLine() << formatv("{0}: ", std::get<0>(Tuple).Index); std::get<1>(Tuple).dump(W.getOStream()); W.getOStream() << '\n'; diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index 42e688cc39b..1fd6c1d7d28 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -642,7 +642,7 @@ unsigned DWARFVerifier::verifyDebugInfoReferences() { // getting the DIE by offset and emitting an error OS << "Verifying .debug_info references...\n"; unsigned NumErrors = 0; - for (const std::pair<uint64_t, std::set<uint64_t>> &Pair : + for (const std::pair<const uint64_t, std::set<uint64_t>> &Pair : ReferenceToDIEOffsets) { if (DCtx.getDIEForOffset(Pair.first)) continue; |