We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c846a39 commit c4b1e19Copy full SHA for c4b1e19
lld/COFF/SymbolTable.cpp
@@ -424,13 +424,11 @@ static void reportProblemSymbols(
424
if (!sym)
425
continue;
426
if (undefs.count(sym)) {
427
- auto it = firstDiag.find(sym);
428
- if (it == firstDiag.end()) {
429
- firstDiag[sym] = undefDiags.size();
+ auto [it, inserted] = firstDiag.try_emplace(sym, undefDiags.size());
+ if (inserted)
430
undefDiags.push_back({sym, {{file, symIndex}}});
431
- } else {
+ else
432
undefDiags[it->second].files.push_back({file, symIndex});
433
- }
434
}
435
if (localImports)
436
if (Symbol *imp = localImports->lookup(sym))
0 commit comments