[llvm] r176491 - Clarify comment for function getObjectSize

Arnold Schwaighofer aschwaighofer at apple.com
Tue Mar 5 08:53:24 PST 2013


Author: arnolds
Date: Tue Mar  5 10:53:24 2013
New Revision: 176491

URL: http://llvm.org/viewvc/llvm-project?rev=176491&view=rev
Log:
Clarify comment for function getObjectSize

Clarify that we mean the object starting at the pointer to the end of the
underlying object and not the size of the whole allocated object.

Modified:
    llvm/trunk/include/llvm/Analysis/MemoryBuiltins.h

Modified: llvm/trunk/include/llvm/Analysis/MemoryBuiltins.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryBuiltins.h?rev=176491&r1=176490&r2=176491&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/MemoryBuiltins.h (original)
+++ llvm/trunk/include/llvm/Analysis/MemoryBuiltins.h Tue Mar  5 10:53:24 2013
@@ -138,7 +138,9 @@ static inline CallInst *isFreeCall(Value
 //
 
 /// \brief Compute the size of the object pointed by Ptr. Returns true and the
-/// object size in Size if successful, and false otherwise.
+// 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.
 bool getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD,





More information about the llvm-commits mailing list