[Support] Remove MemoryBuffer::getNewUninitMemBuffer
authorPavel Labath <labath@google.com>
Thu, 21 Dec 2017 11:27:21 +0000 (11:27 +0000)
committerPavel Labath <labath@google.com>
Thu, 21 Dec 2017 11:27:21 +0000 (11:27 +0000)
commitf13411ee9881c41c6eca81160a531b3bc8e62069
tree9c0b32d72246ed67c29056ecc5611eaede0c7742
parent98727bc26124b06207be869306f32179b25eace0
[Support] Remove MemoryBuffer::getNewUninitMemBuffer

There is nothing useful that can be done with a read-only uninitialized
buffer without const_casting its contents to initialize it. A better
solution is to obtain a writable buffer
(WritableMemoryBuffer::getNewUninitMemBuffer), and then convert it to a
read-only buffer after initialization. All callers of this function have
already been updated to do this, so this function is now unused.

llvm-svn: 321257
llvm/include/llvm/Support/MemoryBuffer.h
llvm/lib/Support/MemoryBuffer.cpp
llvm/unittests/Support/MemoryBufferTest.cpp