Don't type-erase the FunctionNameType or TypeClass enums.

This is similar to D53597, but following up with 2 more enums.
After this, all flag enums should be strongly typed all the way
through to the symbol files plugins.

Differential Revision: https://reviews.llvm.org/D53616

llvm-svn: 345314
This commit is contained in:
Zachary Turner
2018-10-25 20:45:40 +00:00
parent 991e44534a
commit 117b1fa19a
28 changed files with 186 additions and 152 deletions

View File

@@ -135,17 +135,21 @@ uint32_t SBCompileUnit::GetNumSupportFiles() const {
lldb::SBTypeList SBCompileUnit::GetTypes(uint32_t type_mask) {
SBTypeList sb_type_list;
if (m_opaque_ptr) {
ModuleSP module_sp(m_opaque_ptr->GetModule());
if (module_sp) {
SymbolVendor *vendor = module_sp->GetSymbolVendor();
if (vendor) {
TypeList type_list;
vendor->GetTypes(m_opaque_ptr, type_mask, type_list);
sb_type_list.m_opaque_ap->Append(type_list);
}
}
}
if (!m_opaque_ptr)
return sb_type_list;
ModuleSP module_sp(m_opaque_ptr->GetModule());
if (!module_sp)
return sb_type_list;
SymbolVendor *vendor = module_sp->GetSymbolVendor();
if (!vendor)
return sb_type_list;
TypeClass type_class = static_cast<TypeClass>(type_mask);
TypeList type_list;
vendor->GetTypes(m_opaque_ptr, type_class, type_list);
sb_type_list.m_opaque_ap->Append(type_list);
return sb_type_list;
}