File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
llvm/lib/DebugInfo/LogicalView/Readers Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,20 +65,24 @@ LVSectionIndex LVSymbolTable::update(LVScope *Function) {
65
65
Name = Function->getName ();
66
66
std::string SymbolName (Name);
67
67
68
- if (SymbolName.empty () || (SymbolNames.find (SymbolName) == SymbolNames.end ()))
68
+ if (SymbolName.empty ())
69
+ return SectionIndex;
70
+
71
+ auto It = SymbolNames.find (SymbolName);
72
+ if (It == SymbolNames.end ())
69
73
return SectionIndex;
70
74
71
75
// Update a recorded entry with its logical scope, only if the scope has
72
76
// ranges. That is the case when in DWARF there are 2 DIEs connected via
73
77
// the DW_AT_specification.
74
78
if (Function->getHasRanges ()) {
75
- SymbolNames[SymbolName] .Scope = Function;
76
- SectionIndex = SymbolNames[SymbolName] .SectionIndex ;
79
+ It-> second .Scope = Function;
80
+ SectionIndex = It-> second .SectionIndex ;
77
81
} else {
78
82
SectionIndex = UndefinedSectionIndex;
79
83
}
80
84
81
- if (SymbolNames[SymbolName] .IsComdat )
85
+ if (It-> second .IsComdat )
82
86
Function->setIsComdat ();
83
87
84
88
LLVM_DEBUG ({ print (dbgs ()); });
You can’t perform that action at this time.
0 commit comments