Unique types a bit more using the clang type to make sure we don't get multiple copies of the same type due to the debug info having multiple types that get uniqued.

llvm-svn: 184388
This commit is contained in:
Greg Clayton 2013-06-20 01:23:18 +00:00
parent ea2605dc1a
commit 0fc4f31e4b
1 changed files with 8 additions and 2 deletions

View File

@ -407,12 +407,18 @@ SymbolFileDWARF::GetTypes (SymbolContextScope *sc_scope,
// });
// }
std::set<clang_type_t> clang_type_set;
size_t num_types_added = 0;
for (Type *type : type_set)
{
clang_type_t clang_type = type->GetClangForwardType();
if (clang_type_set.find(clang_type) == clang_type_set.end())
{
clang_type_set.insert(clang_type);
type_list.Insert (type->shared_from_this());
++num_types_added;
}
}
return num_types_added;
}