mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-07 03:47:20 +00:00
Remove accidental include and add a comment.
llvm-svn: 100107
This commit is contained in:
parent
71eaf27165
commit
1ef6689d58
@ -14,7 +14,6 @@
|
|||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/ADT/OwningPtr.h"
|
#include "llvm/ADT/OwningPtr.h"
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
|
||||||
#include "llvm/System/Errno.h"
|
#include "llvm/System/Errno.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/System/Path.h"
|
||||||
#include "llvm/System/Process.h"
|
#include "llvm/System/Process.h"
|
||||||
@ -242,8 +241,9 @@ MemoryBuffer *MemoryBuffer::getFile(StringRef Filename, std::string *ErrStr,
|
|||||||
if (ErrStr) *ErrStr = sys::StrError();
|
if (ErrStr) *ErrStr = sys::StrError();
|
||||||
return 0;
|
return 0;
|
||||||
} else if (NumRead == 0) {
|
} else if (NumRead == 0) {
|
||||||
|
// We hit EOF early, truncate and terminate buffer.
|
||||||
Buf->BufferEnd = BufPtr;
|
Buf->BufferEnd = BufPtr;
|
||||||
*BufPtr = 0; // Null terminate buffer.
|
*BufPtr = 0;
|
||||||
return SB.take();
|
return SB.take();
|
||||||
}
|
}
|
||||||
BytesLeft -= NumRead;
|
BytesLeft -= NumRead;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user