aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp')
-rw-r--r--llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
index 3ed0de14f93f..5673ea7c2cd2 100644
--- a/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/Core/LVCompare.cpp
@@ -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";