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