Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down