mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 12:46:08 +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());
|
getFileName());
|
||||||
|
|
||||||
LLVM_DEBUG({ W.printString("Symbol Name", SymbolName); });
|
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?
|
// Saw debug info for this function already?
|
||||||
return createStringError(object_error::parse_failed, getFileName());
|
return createStringError(object_error::parse_failed, getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
FunctionLineTables[SymbolName] = Contents;
|
|
||||||
SymbolNames.push_back(SymbolName);
|
SymbolNames.push_back(SymbolName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user