diff options
author | Fangrui Song <maskray@google.com> | 2019-04-17 06:33:52 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-17 06:33:52 +0000 |
commit | df44ff1b7871dc4cd178c9db7173c45b774da4fd (patch) | |
tree | cbb87509bb6e9c2db984f7c403231c8e58d31494 /llvm/lib/DebugInfo/DWARF | |
parent | b9b35fd12d474c722e24ce69489a605e71ea3cea (diff) | |
download | bcm5719-llvm-df44ff1b7871dc4cd178c9db7173c45b774da4fd.tar.gz bcm5719-llvm-df44ff1b7871dc4cd178c9db7173c45b774da4fd.zip |
[DWARF] Pass ReferenceToDIEOffsets elements by reference
llvm-svn: 358558
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index a95c4f982c0..5ff25b5209e 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -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) |