llvm.org GIT mirror llvm / 6d48faf
getNewMemBuffer memsets the buffer to zeros, the caller don't have to initialize it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214994 91177308-0d34-0410-b5e6-96231b3b80d8 Yaron Keren 5 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
106106 StringRef BufferName = "");
107107
108108 /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
109 /// is completely initialized to zeros. Note that the caller should
109 /// is completely initialized to zeros. Note that the caller need not
110110 /// initialize the memory allocated by this method. The memory is owned by
111111 /// the MemoryBuffer object.
112112 static MemoryBuffer *getNewMemBuffer(size_t Size, StringRef BufferName = "");
141141 }
142142
143143 /// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
144 /// is completely initialized to zeros. Note that the caller should
144 /// is completely initialized to zeros. Note that the caller need not
145145 /// initialize the memory allocated by this method. The memory is owned by
146146 /// the MemoryBuffer object.
147147 MemoryBuffer *MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) {