jimingham wrote:


> On Jul 10, 2024, at 9:22 PM, cmtice ***@***.***> wrote:
> 
> 
> @cmtice commented on this pull request.
> 
> In lldb/include/lldb/Core/DILAST.h 
> <https://github.com/llvm/llvm-project/pull/95738#discussion_r1673380259>:
> 
> > +/// Checks to see if the CompilerType is a Smart Pointer (shared, unique, 
> > weak)
> +/// or not. Only applicable for C++, which is why this is here and not part 
> of
> +/// the CompilerType class.
> When we go to dereference a pointer we need to know whether or not it's a 
> smart pointer, because if it's a smart pointer we need to get at the pointer 
> inside before we can dereference it. So we use IsSmartPtrType to determine 
> whether or not to insert this layer of unwrapping (converting the smart ptr 
> into a normal ptr).
> 
I'm not sure it's the job of the DIL to do this sort of unwrapping.  Then it 
would have to support all the ways this might need to be done in every language 
we might end up supporting.  This seems more a job for the data formatters 
provided by the various languages.  That's why Pavel was asking about the 
special deference Synthetic Child Provider API, I think.  That provides a way 
for various languages to encode this sort of behavior w/o it having to be know 
in advance by lldb.

Jim



> —
> Reply to this email directly, view it on GitHub 
> <https://github.com/llvm/llvm-project/pull/95738#discussion_r1673380259>, or 
> unsubscribe 
> <https://github.com/notifications/unsubscribe-auth/ADUPVW4J5FKAPSUTJYXSJODZLYB7TAVCNFSM6AAAAABJNJ3CAKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCNZQHA4DAOJYGE>.
> You are receiving this because you are on a team that was mentioned.
> 



https://github.com/llvm/llvm-project/pull/95738
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to