raw_ostream: while it is generally desirable to do larger writes, it can lead to
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 4 Mar 2011 19:49:30 +0000 (19:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 4 Mar 2011 19:49:30 +0000 (19:49 +0000)
commitca9714470ec51ec52833eee46bca0062d92e92f3
tree441122779c4c9022280288881e8ab58d46bfee1a
parent979869c28e5bc68e2d4d546c7019525177f1d399
raw_ostream: while it is generally desirable to do larger writes, it can lead to
inefficient file system buffering if the writes are not a multiple of the desired
buffer size. Avoid this by limiting the large write to a multiple of the buffer
size and copying the remainder into the buffer.

Thanks to Dan for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127026 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/raw_ostream.cpp