[DebugInfo] Dump a .debug_line section, including line-number program,
without any compile units.

Differential Revision: https://reviews.llvm.org/D40114

llvm-svn: 318842
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index e96678b..cd7a81f 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -342,10 +342,9 @@
     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.