From 4bc6f19e77a17455fd43a4a340451e075b0dc8d6 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 14 Sep 2015 23:34:26 +0000 Subject: [PATCH] Darwin has a debug info format that stores module types in stand alone files and it uses some of the DWO attributes. Don't assert in SymbolFileDWARFDwo, just return null so everything works. llvm-svn: 247638 --- .../source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp index 0005af76db7f..5b0ac9a47b7a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp @@ -69,8 +69,11 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx DWARFCompileUnit* SymbolFileDWARFDwo::GetCompileUnit() { - assert(GetNumCompileUnits() == 1 && "Only dwo files with 1 compile unit is supported"); - return DebugInfo()->GetCompileUnitAtIndex(0); + // Only dwo files with 1 compile unit is supported + if (GetNumCompileUnits() == 1) + return DebugInfo()->GetCompileUnitAtIndex(0); + else + return nullptr; } DWARFCompileUnit*