forked from OSchip/llvm-project
Remove an assertion and replace with safe code that emits a warning.
llvm-svn: 133786
This commit is contained in:
parent
0c74e78d63
commit
17cc8b9d88
|
@ -305,8 +305,19 @@ Function::GetBlock (bool can_create)
|
|||
{
|
||||
SymbolContext sc;
|
||||
CalculateSymbolContext(&sc);
|
||||
assert(sc.module_sp);
|
||||
sc.module_sp->GetSymbolVendor()->ParseFunctionBlocks(sc);
|
||||
if (sc.module_sp)
|
||||
{
|
||||
sc.module_sp->GetSymbolVendor()->ParseFunctionBlocks(sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
::fprintf (stderr,
|
||||
"unable to find module shared pointer for function '%s' in %s%s%s\n",
|
||||
GetName().GetCString(),
|
||||
m_comp_unit->GetDirectory().GetCString(),
|
||||
m_comp_unit->GetDirectory() ? "/" : "",
|
||||
m_comp_unit->GetFilename().GetCString());
|
||||
}
|
||||
m_block.SetBlockInfoHasBeenParsed (true, true);
|
||||
}
|
||||
return m_block;
|
||||
|
|
Loading…
Reference in New Issue