[Lldb-commits] [PATCH] D30272: Improve data formatter for libstdcpp unique_ptr
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 22 16:10:30 PST 2017
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.
It seems a little wrong to me to hook "IsPointerLikeObject" up to the ValueObject, and not to the Synthetic Child Provider for the type. After all, you are using the Synthetic Child Provider to provide the pointee object, so it should be the synthetic child provider that says it is presenting the bare type as a pointer-like thing. That's also more in line with the way the formatters work. They add structure to an underlying object independent of it's own structure. And the "can be treated like a pointer" bit is just another instance of this.
Also, if you did it that way, you could then add an "is_pointer_like" method to the Scripted Synthetic Child Provider, and this could be adopted by formatters for types lldb knows nothing about.
More information about the lldb-commits