Skip to content

Commit fdaa3c1

Browse files
Remove raw_ostream_proxy_adaptor_base
Created using spr 1.3.5
1 parent dc9fb02 commit fdaa3c1

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

llvm/include/llvm/Support/raw_ostream_proxy.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,6 @@
1313

1414
namespace llvm {
1515

16-
/// Common bits for \a raw_ostream_proxy_adaptor<>, split out to dedup in
17-
/// template instantions.
18-
class raw_ostream_proxy_adaptor_base {
19-
protected:
20-
raw_ostream_proxy_adaptor_base(const raw_ostream_proxy_adaptor_base &) =
21-
delete;
22-
23-
explicit raw_ostream_proxy_adaptor_base(raw_ostream &OS)
24-
: OS(&OS), PreferredBufferSize(OS.GetBufferSize()) {
25-
// Drop OS's buffer to make this->flush() forward. This proxy will add a
26-
// buffer in its place.
27-
OS.SetUnbuffered();
28-
}
29-
30-
~raw_ostream_proxy_adaptor_base() {
31-
assert(!OS && "Derived objects should call resetProxiedOS()");
32-
}
33-
34-
/// Stop proxying the stream, taking the derived object by reference as \p
35-
/// ThisProxyOS. Updates \p ThisProxyOS to stop buffering before setting \a
36-
/// OS to \c nullptr, ensuring that future writes crash immediately.
37-
void resetProxiedOS(raw_ostream &ThisProxyOS) {
38-
ThisProxyOS.SetUnbuffered();
39-
OS = nullptr;
40-
}
41-
42-
bool hasProxiedOS() const { return OS; }
43-
raw_ostream &getProxiedOS() const {
44-
assert(OS && "raw_ostream_proxy_adaptor use after reset");
45-
return *OS;
46-
}
47-
size_t getPreferredBufferSize() const { return PreferredBufferSize; }
48-
49-
private:
50-
raw_ostream *OS;
51-
52-
/// Caches the value of OS->GetBufferSize() at construction time.
53-
size_t PreferredBufferSize;
54-
};
55-
5616
/// Adaptor to create a stream class that proxies another \a raw_ostream.
5717
///
5818
/// Use \a raw_ostream_proxy_adaptor<> directly to implement an abstract

0 commit comments

Comments
 (0)