Skip to content

Commit 8b6764f

Browse files
[DebugInfo] Simplify code with std::unordered_map::operator[] (NFC) (#112658)
1 parent b47849b commit 8b6764f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,8 @@ void LVDWARFReader::updateReference(dwarf::Attribute Attr,
11391139
// Get an element given the DIE offset.
11401140
LVElement *LVDWARFReader::getElementForOffset(LVOffset Offset,
11411141
LVElement *Element, bool IsType) {
1142-
auto Iter = ElementTable.try_emplace(Offset).first;
11431142
// Update the element and all the references pointing to this element.
1144-
LVElementEntry &Entry = Iter->second;
1143+
LVElementEntry &Entry = ElementTable[Offset];
11451144
if (!Entry.Element) {
11461145
if (IsType)
11471146
Entry.Types.insert(Element);

0 commit comments

Comments
 (0)