Skip to content

Commit

Permalink
[DebugInfo] Avoid repeated hash lookups (NFC) (llvm#110620)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata authored and Sterling-Augustine committed Oct 3, 2024
1 parent 3cb68aa commit c92ec3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,9 @@ Error LVCompare::execute(LVReader *ReferenceReader, LVReader *TargetReader) {

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

0 comments on commit c92ec3d

Please sign in to comment.