diff options
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
| -rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 5a71fa3d8ce..c9cf249500d 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -84,7 +84,7 @@ void raw_ostream::SetBuffered() {  }  void raw_ostream::SetBufferAndMode(char *BufferStart, size_t Size, -                                    BufferKind Mode) { +                                   BufferKind Mode) {    assert(((Mode == Unbuffered && BufferStart == 0 && Size == 0) ||            (Mode != Unbuffered && BufferStart && Size)) &&           "stream must be unbuffered or have at least one byte"); @@ -284,7 +284,7 @@ raw_ostream &raw_ostream::write(unsigned char C) {  raw_ostream &raw_ostream::write(const char *Ptr, size_t Size) {    // Group exceptional cases into a single branch. -  if (BUILTIN_EXPECT(OutBufCur+Size > OutBufEnd, false)) { +  if (BUILTIN_EXPECT(size_t(OutBufEnd - OutBufCur) < Size, false)) {      if (BUILTIN_EXPECT(!OutBufStart, false)) {        if (BufferMode == Unbuffered) {          write_impl(Ptr, Size); | 

