[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:49:25 PDT 2024
================
@@ -2758,6 +2758,15 @@ 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() == query.GetTypeBasename().GetStringRef())
+ if (Type *matching_type = ResolveType(die, true, true))
+ results.InsertUnique(matching_type->shared_from_this());
+ return !results.Done(query); // Keep iterating if we aren't done.
+ }
----------------
augusto2112 wrote:
Good catch! Thanks!
https://github.com/llvm/llvm-project/pull/113007
More information about the lldb-commits
mailing list