llvm.org GIT mirror llvm / 2f58085
Reword comment slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215248 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 5 years ago
2 changed file(s) with 6 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
105105 static MemoryBuffer *getMemBufferCopy(StringRef InputData,
106106 StringRef BufferName = "");
107107
108 /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
109 /// is completely initialized to zeros. Note that the caller need not
110 /// initialize the memory allocated by this method. The memory is owned by
111 /// the MemoryBuffer object.
108 /// getNewMemBuffer - Allocate a new zero-initialized MemoryBuffer of the
109 /// specified size. Note that the caller need not initializethe memory
110 /// allocated by this method. The memory is owned by the MemoryBuffer object.
112111 static MemoryBuffer *getNewMemBuffer(size_t Size, StringRef BufferName = "");
113112
114113 /// getNewUninitMemBuffer - Allocate a new MemoryBuffer of the specified size
140140 return new (Mem) MemoryBufferMem(StringRef(Buf, Size), true);
141141 }
142142
143 /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
144 /// is completely initialized to zeros. Note that the caller need not
145 /// initialize the memory allocated by this method. The memory is owned by
146 /// the MemoryBuffer object.
143 /// getNewMemBuffer - Allocate a new zero-initialized MemoryBuffer of the
144 /// specified size. Note that the caller need not initializethe memory
145 /// allocated by this method. The memory is owned by the MemoryBuffer object.
147146 MemoryBuffer *MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) {
148147 MemoryBuffer *SB = getNewUninitMemBuffer(Size, BufferName);
149148 if (!SB) return nullptr;