[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 20 02:31:11 PDT 2016


On 19 October 2016 at 18:39, Jim Ingham <jingham at apple.com> wrote:
>
>> On Oct 19, 2016, at 10:38 AM, Jim Ingham via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>>
>>
>>> On Oct 19, 2016, at 6:35 AM, Pavel Labath via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>>>
>>>
>>> ================
>>> Comment at: source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp:110
>>> +  if (name == ConstString("ptr") || name == ConstString("pointer")) return 2;
>>> +  return UINT32_MAX;
>>> +}
>>> ----------------
>>> ~0 ?
>>>
>>
>> Everywhere else in lldb where we use the maximum of the size returned to mean some error condition, we use UINT32_MAX.  I actually think that's clearer, and looks similar to places where we have other illegal value defines, whereas this just looks like some odd computation.  I don't think this is a good change, and certainly not done in just one place.
>
> To be pedantic:
>
> UINT32_MAX -> <WHATEVER_SIZE>_MAX...

Yeah, I was mostly objecting to the value, I don't care how exactly
you represent it.


More information about the lldb-commits mailing list