================
@@ -1859,17 +1851,11 @@ lldb::SBTypeList SBTarget::FindTypes(const char
*typename_cstr) {
if (typename_cstr && typename_cstr[0] && target_sp) {
ModuleList &images = target_sp->GetImages();
ConstString const_typename(typename_cstr);
- bool exact_match = false;
- TypeList type_list;
- llvm::DenseSet<SymbolFile *> searched_symbol_files;
- images.FindTypes(nullptr, const_typename, exact_match, UINT32_MAX,
- searched_symbol_files, type_list);
-
- for (size_t idx = 0; idx < type_list.GetSize(); idx++) {
- TypeSP type_sp(type_list.GetTypeAtIndex(idx));
- if (type_sp)
- sb_type_list.Append(SBType(type_sp));
- }
+ TypeQuery query(typename_cstr);
+ TypeResults results;
+ images.FindTypes(nullptr, query, results);
+ for (const TypeSP &type_sp : results.GetTypeMap().Types())
----------------
Michael137 wrote:
Should we add a debug-assert here (or maybe in `InsertUnique`) that tests
`type_sp != nullptr`? Or are we guaranteed somewhere that these won't be
`nullptr`?
https://github.com/llvm/llvm-project/pull/74786
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits