diff options
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index e96678bc87c..cd7a81fe892 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -342,10 +342,9 @@ void DWARFContext::dump( while (Offset < LineData.getData().size()) { DWARFUnit *U = nullptr; auto It = LineToUnit.find(Offset); - if (It != LineToUnit.end()) { + if (It != LineToUnit.end()) U = It->second; - LineData.setAddressSize(U->getAddressByteSize()); - } + LineData.setAddressSize(U ? U->getAddressByteSize() : 0); DWARFDebugLine::LineTable LineTable; if (DumpOffset && Offset != *DumpOffset) { // Find the size of this part of the line table section and skip it. |