aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/MemoryBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/MemoryBuffer.h')
-rw-r--r--include/llvm/Support/MemoryBuffer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h
index 1e3a154ede..aa13bfc65a 100644
--- a/include/llvm/Support/MemoryBuffer.h
+++ b/include/llvm/Support/MemoryBuffer.h
@@ -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