[Lldb-commits] [lldb] [lldb] Extend FindTypes to optionally search by mangled type name (PR #113007)

Augusto Noronha via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 29 14:44:31 PDT 2024


================
@@ -1032,11 +1032,17 @@ void SymbolFileCTF::FindTypes(const lldb_private::TypeQuery &match,
 
   ConstString name = match.GetTypeBasename();
   for (TypeSP type_sp : GetTypeList().Types()) {
-    if (type_sp && type_sp->GetName() == name) {
-      results.InsertUnique(type_sp);
-      if (results.Done(match))
-        return;
-    }
+    if (!type_sp)
+      continue;
+    auto type_name =
+        match.GetSearchByMangledName()
+            ? type_sp->GetForwardCompilerType().GetMangledTypeName()
+            : type_sp->GetName();
+    if (type_name != name)
+      continue;
+    results.InsertUnique(type_sp);
+    if (results.Done(match))
+      return;
----------------
augusto2112 wrote:

Sure, I implemented there for completeness.

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


More information about the lldb-commits mailing list