[llvm] 930bf4e - [Support] Use default member initialization in circular_raw_ostream (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 10:34:24 PST 2022
Author: Kazu Hirata
Date: 2022-02-13T10:33:58-08:00
New Revision: 930bf4e7bd870cb10e2f1d9febcd906184900ecb
URL: https://github.com/llvm/llvm-project/commit/930bf4e7bd870cb10e2f1d9febcd906184900ecb
DIFF: https://github.com/llvm/llvm-project/commit/930bf4e7bd870cb10e2f1d9febcd906184900ecb.diff
LOG: [Support] Use default member initialization in circular_raw_ostream (NFC)
Added:
Modified:
llvm/include/llvm/Support/circular_raw_ostream.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/circular_raw_ostream.h b/llvm/include/llvm/Support/circular_raw_ostream.h
index d2f01ea6a7f29..17fb8fa0e476f 100644
--- a/llvm/include/llvm/Support/circular_raw_ostream.h
+++ b/llvm/include/llvm/Support/circular_raw_ostream.h
@@ -38,7 +38,7 @@ namespace llvm {
/// TheStream - The real stream we output to. We set it to be
/// unbuffered, since we're already doing our own buffering.
///
- raw_ostream *TheStream;
+ raw_ostream *TheStream = nullptr;
/// OwnsStream - Are we responsible for managing the underlying
/// stream?
@@ -51,7 +51,7 @@ namespace llvm {
/// BufferArray - The actual buffer storage.
///
- char *BufferArray;
+ char *BufferArray = nullptr;
/// Cur - Pointer to the current output point in BufferArray.
///
@@ -60,7 +60,7 @@ namespace llvm {
/// Filled - Indicate whether the buffer has been completely
/// filled. This helps avoid garbage output.
///
- bool Filled;
+ bool Filled = false;
/// Banner - A pointer to a banner to print before dumping the
/// log.
@@ -106,9 +106,8 @@ namespace llvm {
///
circular_raw_ostream(raw_ostream &Stream, const char *Header,
size_t BuffSize = 0, bool Owns = REFERENCE_ONLY)
- : raw_ostream(/*unbuffered*/ true), TheStream(nullptr),
- OwnsStream(Owns), BufferSize(BuffSize), BufferArray(nullptr),
- Filled(false), Banner(Header) {
+ : raw_ostream(/*unbuffered*/ true), OwnsStream(Owns),
+ BufferSize(BuffSize), Banner(Header) {
if (BufferSize != 0)
BufferArray = new char[BufferSize];
Cur = BufferArray;
More information about the llvm-commits
mailing list