labath wrote:

You're right, I misdiagnosed the problem. I assumed that TypeImpl works like 
ValueImpl, in that provides access to both view of the value, but of course 
that doesn't make much sense for types. TypeImpl really stores a (static_type, 
dynamic_type) pair, but it only does that for types obtained from dynamic 
values (which is kind of okay). For types obtained from static values, the 
second component with this empty.

In light of this, I think the correct solution to my problem (which is -- being 
able to access nested types of dynamic types) really is just to flip the 
prefer_dynamic flag on the function. For static values/types it will not change 
anything, while for dynamic values it will let us access the properties of the 
nested type. If someone doesn't want that (they really want to access the 
properties of the base type), they can always ask for the type of the static 
value.

Let me know what you think of the new version.

https://github.com/llvm/llvm-project/pull/207743
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to