llvm-project/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 [SVE] Remove calls to VectorType::getNumElements from AsmParserTest 2020-07-07 14:55:42 -07:00
BinaryFormat [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
Bitcode [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
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 Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
Frontend [llvm] Migrate from getNumArgOperands to arg_size (NFC) 2021-10-05 08:29:19 -07:00
FuzzMutate [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
IR [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol 2021-10-20 10:29:47 -07:00
InterfaceStub [ifs][elfabi] Merge llvm-ifs/elfabi tools 2021-07-19 11:23:19 -07:00
LineEditor
Linker [RGT] Recode more unreachable assertions and tautologies 2021-03-19 09:17:22 -07:00
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 Add -Wno-error=unknown flag to clang-format. 2020-09-19 10:17:57 +02:00
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 Make TableGenGlobalISel an object library 2021-06-05 15:04:33 +02:00
Target [AArch64] Always add -tune-cpu argument to -cc1 driver 2021-10-19 14:57:51 +01:00
TextAPI [llvm][TextAPI] add mapping from OS string to Platform 2021-05-06 16:25:56 -07:00
Transforms [LV] Record memory widening decisions (NFCI) 2021-10-18 18:03:35 +03:00
XRay Put back the trailing commas on TYPED_TEST_SUITE 2021-05-17 14:14:13 +02:00
tools [X86] Remove little support we had for MPX 2021-10-12 16:18:51 -07:00
CMakeLists.txt [MIRPrinter] Add machine metadata support. 2021-06-19 12:48:08 -04:00
unittest.cfg.in