diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index 29833921097..253178ebb57 100644 --- a/include/llvm/Support/MemoryBuffer.h +++ b/include/llvm/Support/MemoryBuffer.h @@ -106,10 +106,9 @@ public: static MemoryBuffer *getMemBufferCopy(StringRef InputData, StringRef BufferName = ""); - /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that - /// 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. + /// getNewMemBuffer - Allocate a new zero-initialized MemoryBuffer of the + /// specified size. Note that the caller need not initializethe memory + /// allocated by this method. The memory is owned by the MemoryBuffer object. static MemoryBuffer *getNewMemBuffer(size_t Size, StringRef BufferName = ""); /// getNewUninitMemBuffer - Allocate a new MemoryBuffer of the specified size diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp index 75f25beda82..03d2d7d2b88 100644 --- a/lib/Support/MemoryBuffer.cpp +++ b/lib/Support/MemoryBuffer.cpp @@ -141,10 +141,9 @@ MemoryBuffer *MemoryBuffer::getNewUninitMemBuffer(size_t Size, return new (Mem) MemoryBufferMem(StringRef(Buf, Size), true); } -/// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that -/// 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. +/// getNewMemBuffer - Allocate a new zero-initialized MemoryBuffer of the +/// specified size. Note that the caller need not initializethe memory +/// allocated by this method. The memory is owned by the MemoryBuffer object. MemoryBuffer *MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) { MemoryBuffer *SB = getNewUninitMemBuffer(Size, BufferName); if (!SB) return nullptr;