[Lldb-commits] [lldb] Make only one function that needs to be implemented when searching for types (PR #74786)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 11 11:18:46 PST 2023


================
@@ -1696,16 +1696,16 @@ static size_t LookupTypeInModule(Target *target,
                                  CommandInterpreter &interpreter, Stream &strm,
                                  Module *module, const char *name_cstr,
                                  bool name_is_regex) {
-  TypeList type_list;
   if (module && name_cstr && name_cstr[0]) {
-    const uint32_t max_num_matches = UINT32_MAX;
-    bool name_is_fully_qualified = false;
-
-    ConstString name(name_cstr);
-    llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
-    module->FindTypes(name, name_is_fully_qualified, max_num_matches,
-                      searched_symbol_files, type_list);
+    TypeQuery query(name_cstr);
+    TypeResults results;
+    module->FindTypes(query, results);
 
+    TypeList type_list;
+    SymbolContext sc;
+    if (module)
+      sc.module_sp = module->shared_from_this();
+    sc.SortTypeList(results.GetTypeMap(), type_list);
----------------
clayborg wrote:

Will do

https://github.com/llvm/llvm-project/pull/74786


More information about the lldb-commits mailing list