Skip to content

Commit 930bf4e

Browse files
[Support] Use default member initialization in circular_raw_ostream (NFC)
1 parent fda6a1a commit 930bf4e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/include/llvm/Support/circular_raw_ostream.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace llvm {
3838
/// TheStream - The real stream we output to. We set it to be
3939
/// unbuffered, since we're already doing our own buffering.
4040
///
41-
raw_ostream *TheStream;
41+
raw_ostream *TheStream = nullptr;
4242

4343
/// OwnsStream - Are we responsible for managing the underlying
4444
/// stream?
@@ -51,7 +51,7 @@ namespace llvm {
5151

5252
/// BufferArray - The actual buffer storage.
5353
///
54-
char *BufferArray;
54+
char *BufferArray = nullptr;
5555

5656
/// Cur - Pointer to the current output point in BufferArray.
5757
///
@@ -60,7 +60,7 @@ namespace llvm {
6060
/// Filled - Indicate whether the buffer has been completely
6161
/// filled. This helps avoid garbage output.
6262
///
63-
bool Filled;
63+
bool Filled = false;
6464

6565
/// Banner - A pointer to a banner to print before dumping the
6666
/// log.
@@ -106,9 +106,8 @@ namespace llvm {
106106
///
107107
circular_raw_ostream(raw_ostream &Stream, const char *Header,
108108
size_t BuffSize = 0, bool Owns = REFERENCE_ONLY)
109-
: raw_ostream(/*unbuffered*/ true), TheStream(nullptr),
110-
OwnsStream(Owns), BufferSize(BuffSize), BufferArray(nullptr),
111-
Filled(false), Banner(Header) {
109+
: raw_ostream(/*unbuffered*/ true), OwnsStream(Owns),
110+
BufferSize(BuffSize), Banner(Header) {
112111
if (BufferSize != 0)
113112
BufferArray = new char[BufferSize];
114113
Cur = BufferArray;

0 commit comments

Comments
 (0)