jingham added a comment.

You can make up types in the expression parser.  So for instance, I can do:

In D88483#2338408 <https://reviews.llvm.org/D88483#2338408>, @fallkrum wrote:

> Can you please give me a couple of words on what m_static_type and 
> m_dynamic_type is in TypeImpl class, in what cases can it be initialized with 
> both of those types?

ValueObjectDynamic value uses a TypeImpl to store its type, and it stores both 
the static type (the one returned by the parsed expression or was in the DWARF 
variable records for some local value) and the dynamic type it figured out by 
looking at the value in memory in this TypeImpl.  See for instance 
ValueObjectDynamicValue::UpdateValue.  ValueObjectDynamicValue could also get 
its static type from its parent.  I'm not sure why it doesn't do that and 
stores it in its TypeImpl instead; presumably this was more convenient 
somewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88483

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to