Fix raw_fd_ostream::write_impl hang with large output
On Windows when raw_fd_ostream::write_impl calls write, a 32 bit input
is required for character count. As a variable with size_t is used for
this argument on x64 integral demotion occurs. In the case of large
files an infinite loop follows.
See PR37926.
This fix allows the output of files larger than previous int32 limit.
Differential Revision: https://reviews.llvm.org/D48948
Patch by Owen Reynolds
Reviewed by: zturner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338027 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed