dwarfdump: DWP type unit index dumping skeleton
[oota-llvm.git] / lib / DebugInfo / DWARF / DWARFCompileUnit.cpp
index 01e724799ab25152e0971685c613a9fc9e7a6281..39a7c772dc76f4d65c9d2499f230ab44c4814ad5 100644 (file)
@@ -22,9 +22,10 @@ void DWARFCompileUnit::dump(raw_ostream &OS) {
      << " (next unit at " << format("0x%08x", getNextUnitOffset())
      << ")\n";
 
-  const DWARFDebugInfoEntryMinimal *CU = getCompileUnitDIE(false);
-  assert(CU && "Null Compile Unit?");
-  CU->dump(OS, this, -1U);
+  if (const DWARFDebugInfoEntryMinimal *CU = getUnitDIE(false))
+    CU->dump(OS, this, -1U);
+  else
+    OS << "<compile unit can't be parsed!>\n\n";
 }
 
 // VTable anchor.