Add new MemoryBuffer::getMemBufferCopy method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-10-09 21:46:38 +00:00
parent ec1f944230
commit 3daae2701b
2 changed files with 21 additions and 2 deletions

View File

@@ -61,6 +61,12 @@ public:
static MemoryBuffer *getMemBuffer(const char *StartPtr, const char *EndPtr,
const char *BufferName = "");
/// getMemBufferCopy - Open the specified memory range as a MemoryBuffer,
/// copying the contents and taking ownership of it. This has no requirements
/// on EndPtr[0].
static MemoryBuffer *getMemBufferCopy(const char *StartPtr,const char *EndPtr,
const char *BufferName = "");
/// getNewMemBuffer - Allocate a new MemoryBuffer of the specified size that
/// is completely initialized to zeros. Note that the caller should
/// initialize the memory allocated by this method. The memory is owned by