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

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 30 05:56:29 PDT 2024


================
@@ -2758,6 +2758,20 @@ void SymbolFileDWARF::FindTypes(const TypeQuery &query, TypeResults &results) {
         return true; // Keep iterating over index types, language mismatch.
     }
 
+    // Since mangled names are unique, we only need to check if the names are
+    // the same.
+    if (query.GetSearchByMangledName()) {
+      if (die.GetMangledName(/*substitute_name_allowed=*/false) !=
----------------
Michael137 wrote:

Even with substitutions, that would only cause problems if the `DW_AT_name` somehow contained a the mangled name, right? Even then, that might not actually be a problem.

But I guess being more explicit about really only checking the linkage name seems fine

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


More information about the lldb-commits mailing list