Fixed a crasher that happens if we try to inspect

a NULL symbol file.

<rdar://problem/11795939>

llvm-svn: 159882
This commit is contained in:
Sean Callanan 2012-07-07 01:07:33 +00:00
parent 786de35fa0
commit 3b18fbd983
1 changed files with 3 additions and 0 deletions

View File

@ -280,6 +280,9 @@ SymbolFileDWARFDebugMap::GetSymbolFileByCompUnitInfo (CompileUnitInfo *comp_unit
// it will have the remapped sections that we do below.
SymbolFileDWARF *oso_symfile = (SymbolFileDWARF *)comp_unit_info->oso_symbol_vendor->GetSymbolFile();
if (!oso_symfile)
return NULL;
if (oso_symfile->GetNumCompileUnits() != 1)
{
oso_symfile->GetObjectFile()->GetModule()->ReportError ("DWARF for object file '%s' contains multiple translation units!",