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
This commit is contained in:
Rafael Espindola
2011-03-22 19:20:47 +00:00
parent c1dbd5d9c3
commit 11d1803770
3 changed files with 16 additions and 7 deletions

View File

@@ -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.