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

@@ -365,8 +365,9 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name,
const bool append = true;
const bool symbols_ok = true;
const bool inlines_ok = true;
module_sp->FindFunctions(ConstString(name), NULL, name_type_mask,
symbols_ok, inlines_ok, append, *sb_sc_list);
FunctionNameType type = static_cast<FunctionNameType>(name_type_mask);
module_sp->FindFunctions(ConstString(name), NULL, type, symbols_ok,
inlines_ok, append, *sb_sc_list);
}
return sb_sc_list;
}
@@ -484,14 +485,16 @@ lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) {
SBTypeList sb_type_list;
ModuleSP module_sp(GetSP());
if (module_sp) {
SymbolVendor *vendor = module_sp->GetSymbolVendor();
if (vendor) {
TypeList type_list;
vendor->GetTypes(NULL, type_mask, type_list);
sb_type_list.m_opaque_ap->Append(type_list);
}
}
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(NULL, type_class, type_list);
sb_type_list.m_opaque_ap->Append(type_list);
return sb_type_list;
}