[Lldb-commits] [lldb] [LLDB] Modify CreateValueObjectFrom* to take an ExecutionContext (PR #185547)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 10 15:49:55 PDT 2026
adrian-prantl wrote:
> > Do you ever intend to use anything out of the execution context besides the type system to use? If not, it seems like we're passing a lot more information than we need to. Wouldn't it be better to pass exactly what the ValueObject's need and let the caller decide how to extract that information?
>
> The most crucial bit of information we need is really a language. But to _instantiate_ a type system, we also need a target; even better, a compile unit. So I think the execution context nicely combines these two properties. But it is weird hide the type system initialization logic in the create... functions. Let me experiment with what this API looks like if we pass in a TypeSystem instead.
Looking at this more, these APIs really want an ExecutionContext. Even the ones that take a target ultimately only use to to create an ExecutionContext from it. However, there is still value in being explicit about the type system.
https://github.com/llvm/llvm-project/pull/185547
More information about the lldb-commits
mailing list