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 | 9916d2ac3941513e301e39dee76a981c7caab694 (patch) | |
tree | 0d83c49ddf87b257b95d378dc8df1bb9d61d6706 /include/llvm/Support/MemoryBuffer.h | |
parent | 813c9a0f19c0d27085a3ea81eb44033747007741 (diff) | |
download | external_llvm-9916d2ac3941513e301e39dee76a981c7caab694.zip external_llvm-9916d2ac3941513e301e39dee76a981c7caab694.tar.gz external_llvm-9916d2ac3941513e301e39dee76a981c7caab694.tar.bz2 |
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/llvm/Support/MemoryBuffer.h')
-rw-r--r-- | include/llvm/Support/MemoryBuffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index a52dc11..3006367 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 |