]> granicus.if.org Git - llvm/commitdiff
[DWARF] Pass ReferenceToDIEOffsets elements by reference
authorFangrui Song <maskray@google.com>
Wed, 17 Apr 2019 06:33:52 +0000 (06:33 +0000)
committerFangrui Song <maskray@google.com>
Wed, 17 Apr 2019 06:33:52 +0000 (06:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358558 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARF/DWARFVerifier.cpp

index a95c4f982c0beedb5c0a7881fbb009a487adea45..5ff25b5209e445d926b59cb139eea10ab67bdad8 100644 (file)
@@ -638,9 +638,9 @@ unsigned DWARFVerifier::verifyDebugInfoReferences() {
   // getting the DIE by offset and emitting an error
   OS << "Verifying .debug_info references...\n";
   unsigned NumErrors = 0;
-  for (auto Pair : ReferenceToDIEOffsets) {
-    auto Die = DCtx.getDIEForOffset(Pair.first);
-    if (Die)
+  for (const std::pair<uint64_t, std::set<uint32_t>> &Pair :
+       ReferenceToDIEOffsets) {
+    if (DCtx.getDIEForOffset(Pair.first))
       continue;
     ++NumErrors;
     error() << "invalid DIE reference " << format("0x%08" PRIx64, Pair.first)