[llvm] r214994 - getNewMemBuffer memsets the buffer to zeros,

Yaron Keren yaron.keren at gmail.com
Wed Aug 6 13:59:09 PDT 2014


Author: yrnkrn
Date: Wed Aug  6 15:59:09 2014
New Revision: 214994

URL: http://llvm.org/viewvc/llvm-project?rev=214994&view=rev
Log:
getNewMemBuffer memsets the buffer to zeros,
the caller don't have to initialize it.


Modified:
    llvm/trunk/include/llvm/Support/MemoryBuffer.h
    llvm/trunk/lib/Support/MemoryBuffer.cpp

Modified: llvm/trunk/include/llvm/Support/MemoryBuffer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MemoryBuffer.h?rev=214994&r1=214993&r2=214994&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MemoryBuffer.h (original)
+++ llvm/trunk/include/llvm/Support/MemoryBuffer.h Wed Aug  6 15:59:09 2014
@@ -107,7 +107,7 @@ public:
                                         StringRef BufferName = "");
 
   /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
-  /// is completely initialized to zeros.  Note that the caller should
+  /// is completely initialized to zeros.  Note that the caller need not
   /// initialize the memory allocated by this method.  The memory is owned by
   /// the MemoryBuffer object.
   static MemoryBuffer *getNewMemBuffer(size_t Size, StringRef BufferName = "");

Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=214994&r1=214993&r2=214994&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
+++ llvm/trunk/lib/Support/MemoryBuffer.cpp Wed Aug  6 15:59:09 2014
@@ -142,7 +142,7 @@ MemoryBuffer *MemoryBuffer::getNewUninit
 }
 
 /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
-/// is completely initialized to zeros.  Note that the caller should
+/// is completely initialized to zeros.  Note that the caller need not
 /// initialize the memory allocated by this method.  The memory is owned by
 /// the MemoryBuffer object.
 MemoryBuffer *MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) {





More information about the llvm-commits mailing list