llvm-capstone/llvm/unittests
Duncan P. N. Exon Smith e18ea6f294 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
2021-10-22 16:25:31 -07:00
..
ADT [llvm] [ADT] Update llvm::Split() per Pavel Labath's suggestions 2021-10-22 12:27:46 +02:00
Analysis [llvm] Update report_fatal_error calls from raw_string_ostream to use Twine(OS.str()) 2021-10-05 18:42:12 +01:00
AsmParser
BinaryFormat [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
Bitcode
Bitstream PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
CodeGen [DebugInfo][Instr] Track subregisters across stack spills/restores 2021-10-22 19:20:55 +01:00
DebugInfo [DebugInfo] Expand ability to load 2-byte addresses in dwarf sections 2021-10-21 17:31:00 -07:00
Demangle [Demangle] Rename OutputStream to OutputString 2021-10-21 17:34:57 -07:00
ExecutionEngine [JITLink][NFC] Fix Wdangling-else warning in LinkGraphTests 2021-10-18 10:06:55 -07:00
FileCheck
Frontend [llvm] Migrate from getNumArgOperands to arg_size (NFC) 2021-10-05 08:29:19 -07:00
FuzzMutate
InterfaceStub [ifs][elfabi] Merge llvm-ifs/elfabi tools 2021-07-19 11:23:19 -07:00
IR [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol 2021-10-20 10:29:47 -07:00
LineEditor
Linker
MC Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
MI Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
MIR [Codegen] Set ARITH_FENCE as meta-instruction 2021-10-21 10:19:22 +08:00
Object [XCOFF] Improve error message context. 2021-10-11 02:52:20 +00:00
ObjectYAML
Option [OptTable] Reapply Improve error message output for grouped short options 2021-09-03 11:13:52 +01:00
Passes [AIX] Enable rtl for plugins test 2021-10-22 12:08:22 -04:00
ProfileData [CSSPGO] Split context string to deduplicate function name used in the context. 2021-08-30 20:09:29 -07:00
Remarks
Support Support: Skip buffering buffer_unique_ostream's owned stream 2021-10-22 16:25:31 -07:00
TableGen
Target [AArch64] Always add -tune-cpu argument to -cc1 driver 2021-10-19 14:57:51 +01:00
TextAPI
tools [X86] Remove little support we had for MPX 2021-10-12 16:18:51 -07:00
Transforms [LV] Record memory widening decisions (NFCI) 2021-10-18 18:03:35 +03:00
XRay
CMakeLists.txt
unittest.cfg.in