[llvm] r176408 - recommit r172363 & r171325 (reverted in r172756)

Nuno Lopes nunoplopes at sapo.pt
Tue Mar 5 11:01:53 PST 2013


Thanks again!
Nuno

----- Original Message -----
> r176491
>
> On Mar 5, 2013, at 6:40 AM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
>>>
>> >It is not very clear what the "object pointed by Ptr" is and that the 
>> >function could be misconstrued to have the same semantics of 
>> >getUnderlyingObjectSize even after reading the doc string. You have to 
>> >read its implementation to know what it is doing. Hence my proposal for 
>> >"getPointerAdjustedObjectSize". I agree that "getPointerAdjusted…" might 
>> >also not be very clear, maybe "getSizeFromPtrToEndOfObject". Or at least 
>> >including it in the documentation string  (Personally, I have a slight 
>> >preference for talking function names than doc strings).
>>>
>>> /// \brief Compute the size of the object pointed by Ptr. Returns true 
>>> and the
>>> /// object size in Size if successful, and false otherwise. In this 
>>> context by object we mean
>>> /// the region of memory starting at Ptr to the end of the underlying 
>>> object pointed to by Ptr.
>>> /// If RoundToAlign is true, then Size is rounded up to the aligment of 
>>> allocas,
>>> /// byval arguments, and global variables.
>>
>> I see, it makes perfect sense to improve that comment to clarify what the 
>> function does.  Would you mind commiting your change, please?
>>
>> Danke,
>> Nuno
>
> Gerne geschehen :).= 




More information about the llvm-commits mailing list