File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -967,21 +967,20 @@ void DWARFVerifier::verifyDebugLineStmtOffsets() {
967
967
// here because we validate this in the .debug_info verifier.
968
968
continue ;
969
969
}
970
- auto Iter = StmtListToDie.find (LineTableOffset);
971
- if (Iter != StmtListToDie. end () ) {
970
+ auto [ Iter, Inserted] = StmtListToDie.try_emplace (LineTableOffset, Die );
971
+ if (!Inserted ) {
972
972
++NumDebugLineErrors;
973
+ const auto &OldDie = Iter->second ;
973
974
ErrorCategory.Report (" Identical DW_AT_stmt_list section offset" , [&]() {
974
975
error () << " two compile unit DIEs, "
975
- << format (" 0x%08" PRIx64, Iter-> second .getOffset ()) << " and "
976
+ << format (" 0x%08" PRIx64, OldDie .getOffset ()) << " and "
976
977
<< format (" 0x%08" PRIx64, Die.getOffset ())
977
978
<< " , have the same DW_AT_stmt_list section offset:\n " ;
978
- dump (Iter-> second );
979
+ dump (OldDie );
979
980
dump (Die) << ' \n ' ;
980
981
});
981
982
// Already verified this line table before, no need to do it again.
982
- continue ;
983
983
}
984
- StmtListToDie[LineTableOffset] = Die;
985
984
}
986
985
}
987
986
You can’t perform that action at this time.
0 commit comments