[Lldb-commits] [PATCH] D114627: [lldb] add new overload for SymbolFile::FindTypes that accepts a scope

Lasse Folger via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 28 01:27:40 PDT 2022


lassefolger added a comment.
Herald added a project: All.

Sorry for the very late response.

I looked into using the `CompilerDeclContext()`.

This does not work in this case because the context is not set in this specific use case and I'm not sure if it case be set.
It is initialized with an invalid context when the function is called <https://github.com/llvm/llvm-project/blob/479eed18503d1cf17fe9c0348cdb5f2968bc9969/lldb/source/Core/Module.cpp#L987-L988>.

The entry point in our use case is `lldb::SBTarget::FindTypes(const char *)`. A stacktrace looks like this:
SymbolFileDWARF::FindTypes()
lldb_private::Module::FindTypes_Impl()
lldb_private::ModuleList::FindTypes()
lldb::SBTarget::FindTypes()

Given that the input is just a C-string, I'm not sure how to derive a `CompilerDeclContext()` from that.
What we are trying to optimize is a call like:
`lldb.target.FindTypes("Some::Namespace::Type")`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114627/new/

https://reviews.llvm.org/D114627



More information about the lldb-commits mailing list