[PATCH] D133503: Support: Add proxies for raw_ostream and raw_pwrite_stream

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 09:34:01 PDT 2022


steven_wu created this revision.
steven_wu added reviewers: sammccall, benlangmuir, raghavmedicherla, kzhuravl, dexonsmith.
Herald added subscribers: ributzka, hiraditya, mgorny.
Herald added a project: All.
steven_wu requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133503

Files:
  llvm/include/llvm/Support/raw_ostream_proxy.h
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/raw_ostream_proxy.cpp
  llvm/unittests/Support/CMakeLists.txt
  llvm/unittests/Support/raw_ostream_proxy_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133503.458773.patch
Type: text/x-patch
Size: 14713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/c45a3acd/attachment.bin>


More information about the llvm-commits mailing list