mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 08:34:59 +00:00
e18ea6f294
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 |
||
---|---|---|
.. | ||
ADT | ||
Analysis | ||
AsmParser | ||
BinaryFormat | ||
Bitcode | ||
Bitstream | ||
CodeGen | ||
DebugInfo | ||
Demangle | ||
ExecutionEngine | ||
FileCheck | ||
Frontend | ||
FuzzMutate | ||
InterfaceStub | ||
IR | ||
LineEditor | ||
Linker | ||
MC | ||
MI | ||
MIR | ||
Object | ||
ObjectYAML | ||
Option | ||
Passes | ||
ProfileData | ||
Remarks | ||
Support | ||
TableGen | ||
Target | ||
TextAPI | ||
tools | ||
Transforms | ||
XRay | ||
CMakeLists.txt | ||
unittest.cfg.in |