diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-17 22:18:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-17 22:18:42 +0000 |
commit | ab959a2e68a0c40abb9f69adefb33e1306022333 (patch) | |
tree | 7bb7def286f6154b2ff17f6d2e9849037dc5b169 /llvm/include | |
parent | aad34d882d4f478249828fa32e57a288d706ba34 (diff) | |
download | bcm5719-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.h | 3 |
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 |