Don't crash when we can't find a block for some reason, just try and do the right thing and fail gracefully.

<rdar://problem/19196221>

llvm-svn: 226087
This commit is contained in:
Greg Clayton 2015-01-15 03:13:44 +00:00
parent dd669615dd
commit f7bb1fba36
1 changed files with 5 additions and 3 deletions

View File

@ -3485,9 +3485,11 @@ SymbolFileDWARF::ResolveFunction (DWARFCompileUnit *cu,
// Parse all blocks if needed
if (inlined_die)
{
sc.block = sc.function->GetBlock (true).FindBlockByID (MakeUserID(inlined_die->GetOffset()));
assert (sc.block != NULL);
if (sc.block->GetStartAddress (addr) == false)
Block &function_block = sc.function->GetBlock (true);
sc.block = function_block.FindBlockByID (MakeUserID(inlined_die->GetOffset()));
if (sc.block == NULL)
sc.block = function_block.FindBlockByID (inlined_die->GetOffset());
if (sc.block == NULL || sc.block->GetStartAddress (addr) == false)
addr.Clear();
}
else