diff options
author | James Henderson <jh7370@my.bristol.ac.uk> | 2018-07-26 15:54:53 +0000 |
---|---|---|
committer | James Henderson <jh7370@my.bristol.ac.uk> | 2018-07-26 15:54:53 +0000 |
commit | 3d26f12de97af1c2211e12691f4a85bc1a92ea9e (patch) | |
tree | 939164a1cda16eb878bb18a5a5d5d36b9ed3d9df /llvm/lib/Support | |
parent | 6f1da6e345ccf89a7a0d0bc964bee7f1eb7ed9f6 (diff) | |
download | bcm5719-llvm-3d26f12de97af1c2211e12691f4a85bc1a92ea9e.tar.gz bcm5719-llvm-3d26f12de97af1c2211e12691f4a85bc1a92ea9e.zip |
Revert r338027 to pacify build bot
llvm-svn: 338035
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 1dae469958f..038ad00bd60 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -613,10 +613,10 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) { assert(FD >= 0 && "File already closed."); pos += Size; - // The maximum write size is limited to INT32_MAX. A write - // greater than SSIZE_MAX is implementation-defined in POSIX, - // and Windows _write requires 32 bit input. - size_t MaxWriteSize = INT32_MAX; + // The maximum write size is limited to SSIZE_MAX because a write + // greater than SSIZE_MAX is implementation-defined in POSIX. + // Since SSIZE_MAX is not portable, we use SIZE_MAX >> 1 instead. + size_t MaxWriteSize = SIZE_MAX >> 1; #if defined(__linux__) // It is observed that Linux returns EINVAL for a very large write (>2G). |