[Lldb-commits] [lldb] Improve type lookup using .debug_names parent chain (PR #108907)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 9 12:42:35 PDT 2024
================
@@ -444,6 +499,72 @@ void DebugNamesDWARFIndex::GetNamespaces(
m_fallback.GetNamespaces(name, callback);
}
+llvm::SmallVector<CompilerContext>
+DebugNamesDWARFIndex::GetTypeQueryParentContexts(TypeQuery &query) {
+ std::vector<lldb_private::CompilerContext> &query_decl_context =
+ query.GetContextRef();
+ llvm::SmallVector<CompilerContext> parent_contexts;
+ if (!query_decl_context.empty()) {
+ // Skip the last entry, it is the type we are looking for.
----------------
jeffreytan81 wrote:
The vector returned from `TypeQuery::GetContextRef()` stores from outmost to innermost namespace which is reversed from what's we wanted (and .debug_names encoded in parent chain).
https://github.com/llvm/llvm-project/pull/108907
More information about the lldb-commits
mailing list