mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 20:36:06 +00:00
[DebugInfo] Avoid repeated hash lookups (NFC) (#128632)
This commit is contained in:
parent
43401dd0b5
commit
38f8ca1d18
@ -721,12 +721,11 @@ Error LVCodeViewReader::traverseSymbolSection(StringRef SectionName,
|
||||
getFileName());
|
||||
|
||||
LLVM_DEBUG({ W.printString("Symbol Name", SymbolName); });
|
||||
if (FunctionLineTables.count(SymbolName) != 0) {
|
||||
if (!FunctionLineTables.try_emplace(SymbolName, Contents).second) {
|
||||
// Saw debug info for this function already?
|
||||
return createStringError(object_error::parse_failed, getFileName());
|
||||
}
|
||||
|
||||
FunctionLineTables[SymbolName] = Contents;
|
||||
SymbolNames.push_back(SymbolName);
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user