Skip to content

Commit f01d45c

Browse files
[DebugInfo] Avoid repeated hash lookups (NFC) (llvm#110620)
1 parent 616d1d2 commit f01d45c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,9 @@ Error LVCompare::execute(LVReader *ReferenceReader, LVReader *TargetReader) {
312312

313313
// We need to find an insertion point in the reference scopes tree.
314314
Parent = Element->getParentScope();
315-
if (ScopeLinks.find(Parent) != ScopeLinks.end()) {
316-
LVScope *InsertionPoint = ScopeLinks[Parent];
315+
auto It = ScopeLinks.find(Parent);
316+
if (It != ScopeLinks.end()) {
317+
LVScope *InsertionPoint = It->second;
317318
LLVM_DEBUG({
318319
dbgs() << "Inserted at: "
319320
<< hexSquareString(InsertionPoint->getOffset()) << "\n";

0 commit comments

Comments
 (0)