summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitab959a2e68a0c40abb9f69adefb33e1306022333 (patch)
tree7bb7def286f6154b2ff17f6d2e9849037dc5b169 /llvm/include
parentaad34d882d4f478249828fa32e57a288d706ba34 (diff)
downloadbcm5719-llvm-ab959a2e68a0c40abb9f69adefb33e1306022333.tar.gz
bcm5719-llvm-ab959a2e68a0c40abb9f69adefb33e1306022333.zip
Use RequiresNullTerminator to create buffers without a null terminator
instead of copying. llvm-svn: 127835
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/MemoryBuffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/MemoryBuffer.h b/llvm/include/llvm/Support/MemoryBuffer.h
index a52dc11cffa..3006367a5a0 100644
--- a/llvm/include/llvm/Support/MemoryBuffer.h
+++ b/llvm/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
OpenPOWER on IntegriCloud