When we resolve a forward declaration type, be sure to put it into the m_die_to_type map so we don't assert later when someone tries to resolve the type.

llvm-svn: 119910
This commit is contained in:
Greg Clayton 2010-11-20 19:16:50 +00:00
parent 3dc6455ff0
commit facfd06c4f
1 changed files with 6 additions and 0 deletions

View File

@ -3035,8 +3035,14 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
type_sp = m_debug_map_symfile->FindDefinitionTypeForDIE (dwarf_cu, die, type_name_const_str);
}
if (type_sp)
{
// We found a real definition for this type elsewhere
// so lets use it and cache the fact that we found
// a complete type for this die
m_die_to_type[die] = type_sp.get();
return type_sp;
}
}
assert (tag_decl_kind != -1);
bool clang_type_was_created = false;
clang_type = m_forward_decl_die_to_clang_type.lookup (die);