Page MenuHomePhabricator

Support: Add proxies for raw_ostream and raw_pwrite_stream
Needs ReviewPublic

Authored by steven_wu on Sep 8 2022, 9:33 AM.

Details

Summary

Add proxies classes for raw_ostream and raw_pwrite_stream called
raw_ostream_proxy and raw_pwrite_stream_proxy. Add adaptor classes,
raw_ostream_proxy_adaptor<> and raw_pwrite_stream_proxy_adaptor<>,
to allow subclasses to use a different parent class than raw_ostream
or raw_pwrite_stream.

The adaptors are used by a future patch to help a subclass of
llvm::vfs::OutputFile, an abstract subclass of raw_pwrite_stream, to
proxy a raw_fd_ostream.

Patched by dexonsmith.

Diff Detail

Unit TestsFailed

TimeTest
2,860 msx64 debian > HWAddressSanitizer-x86_64.TestCases::heap-buffer-overflow.c
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -fsanitize-hwaddress-experimental-aliasing -mllvm -hwasan-generate-tags-with-calls=1 -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/hwasan/TestCases/heap-buffer-overflow.c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/heap-buffer-overflow.c.tmp