aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-09-22 23:31:43 -0400
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-10-22 16:25:31 -0700
commite18ea6f2946a10042258b976e60166a926ee939a (patch)
treede2ea3d7d9c348fa89b79a089844f5235da94fd7 /clang/lib/Lex/ModuleMap.cpp
parentb83242e20e099c9cc4ba90a63abda8ba6e2f32d5 (diff)
downloadllvm-e18ea6f2946a10042258b976e60166a926ee939a.zip
llvm-e18ea6f2946a10042258b976e60166a926ee939a.tar.gz
llvm-e18ea6f2946a10042258b976e60166a926ee939a.tar.bz2
Support: Skip buffering buffer_unique_ostream's owned stream
Change buffer_unique_ostream's constructor to call raw_ostream::SetUnbuffered() on its owned stream. Otherwise, buffer_unique_ostream's destructor could cause the owned stream to temporarily allocate a buffer only to be immediately flushed. Also add some tests for buffer_ostream and buffer_unique_ostream. Use the same naming scheme as other raw_ostream-related tests (e.g., `raw_ostreamTest` for the fixture, `raw_ostream_test.cpp` for the filename). (I considered changing buffer_ostream in the same way (calling SetUnbuffered on the referenced stream), but that seemed like overreach since the client may have more things to write.) (I considered merging buffer_ostream and buffer_unique_ostream into a single class (with a `raw_ostream&` and a `std::unique_ptr` that is only sometimes used), but that makes the class bigger and the small amount of code deduplication seems uncompelling.) Differential Revision: https://reviews.llvm.org/D110369
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions