diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-22 19:20:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-22 19:20:47 +0000 |
commit | 11d1803770f54dad441007a6ebafc70cb9395695 (patch) | |
tree | b4f740d419bebe0722cb6c5d01970c9ae65bc2e5 /include/llvm/Support/MemoryBuffer.h | |
parent | c1dbd5d9c30ea67ae45f190ff90e076cdf8bbc17 (diff) | |
download | external_llvm-11d1803770f54dad441007a6ebafc70cb9395695.zip external_llvm-11d1803770f54dad441007a6ebafc70cb9395695.tar.gz external_llvm-11d1803770f54dad441007a6ebafc70cb9395695.tar.bz2 |
We don't need a null terminator for the output file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MemoryBuffer.h')
-rw-r--r-- | include/llvm/Support/MemoryBuffer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index 3006367..9a2aff0 100644 --- a/include/llvm/Support/MemoryBuffer.h +++ b/include/llvm/Support/MemoryBuffer.h @@ -64,10 +64,12 @@ public: /// specified, this means that the client knows that the file exists and that /// it has the specified size. static error_code getFile(StringRef Filename, OwningPtr<MemoryBuffer> &result, - int64_t FileSize = -1); + int64_t FileSize = -1, + bool RequiresNullTerminator = true); static error_code getFile(const char *Filename, OwningPtr<MemoryBuffer> &result, - int64_t FileSize = -1); + int64_t FileSize = -1, + bool RequiresNullTerminator = true); /// getOpenFile - Given an already-open file descriptor, read the file and /// return a MemoryBuffer. |