summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-03-17 22:18:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-03-17 22:18:42 +0000
commit9916d2ac3941513e301e39dee76a981c7caab694 (patch)
tree0d83c49ddf87b257b95d378dc8df1bb9d61d6706 /include
parent813c9a0f19c0d27085a3ea81eb44033747007741 (diff)
downloadllvm-9916d2ac3941513e301e39dee76a981c7caab694.tar.gz
llvm-9916d2ac3941513e301e39dee76a981c7caab694.tar.bz2
llvm-9916d2ac3941513e301e39dee76a981c7caab694.tar.xz
Use RequiresNullTerminator to create buffers without a null terminator
instead of copying. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/MemoryBuffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h
index a52dc11cff..3006367a5a 100644
--- a/include/llvm/Support/MemoryBuffer.h
+++ b/include/llvm/Support/MemoryBuffer.h
@@ -81,7 +81,8 @@ public:
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
/// that InputData must be null terminated.
static MemoryBuffer *getMemBuffer(StringRef InputData,
- StringRef BufferName = "");
+ StringRef BufferName = "",
+ bool RequiresNullTerminator = true);
/// getMemBufferCopy - Open the specified memory range as a MemoryBuffer,
/// copying the contents and taking ownership of it. InputData does not