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
This commit is contained in:
Greg Clayton
2015-09-14 23:34:26 +00:00
parent c92d28d427
commit 4bc6f19e77

View File

@@ -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*