diff options
author | mingmingl <mingmingl@google.com> | 2025-02-04 11:11:14 -0800 |
---|---|---|
committer | mingmingl <mingmingl@google.com> | 2025-02-04 11:11:14 -0800 |
commit | e91747a92d27ecf799427bf563f9f64f7c4d2447 (patch) | |
tree | 7aa5a8a9170deec293e152bdf2be804399dcd612 /llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | |
parent | 3a8d9337d816aef41c3ca1484be8b933a71a3c46 (diff) | |
parent | 53d6e59b594639417cdbfcfa2d18cea64acb4009 (diff) | |
download | llvm-users/mingmingl-llvm/spr/sdpglobalvariable.zip llvm-users/mingmingl-llvm/spr/sdpglobalvariable.tar.gz llvm-users/mingmingl-llvm/spr/sdpglobalvariable.tar.bz2 |
Merge branch 'main' into users/mingmingl-llvm/spr/sdpglobalvariableusers/mingmingl-llvm/spr/sdpglobalvariable
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index 8bf5135..107e79c 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -967,21 +967,20 @@ void DWARFVerifier::verifyDebugLineStmtOffsets() { // here because we validate this in the .debug_info verifier. continue; } - auto Iter = StmtListToDie.find(LineTableOffset); - if (Iter != StmtListToDie.end()) { + auto [Iter, Inserted] = StmtListToDie.try_emplace(LineTableOffset, Die); + if (!Inserted) { ++NumDebugLineErrors; + const auto &OldDie = Iter->second; ErrorCategory.Report("Identical DW_AT_stmt_list section offset", [&]() { error() << "two compile unit DIEs, " - << format("0x%08" PRIx64, Iter->second.getOffset()) << " and " + << format("0x%08" PRIx64, OldDie.getOffset()) << " and " << format("0x%08" PRIx64, Die.getOffset()) << ", have the same DW_AT_stmt_list section offset:\n"; - dump(Iter->second); + dump(OldDie); dump(Die) << '\n'; }); // Already verified this line table before, no need to do it again. - continue; } - StmtListToDie[LineTableOffset] = Die; } } |