From d679cdda50910f5ba3e9ecaacb77bcaacb15d6c8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 27 May 2023 10:29:21 -0700 Subject: [PATCH] [Bitcode] Modernize PerBlockIDStats (NFC) --- llvm/include/llvm/Bitcode/BitcodeAnalyzer.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h b/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h index 63ecf85..33a2949 100644 --- a/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h +++ b/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h @@ -65,21 +65,19 @@ class BitcodeAnalyzer { struct PerBlockIDStats { /// NumInstances - This the number of times this block ID has been seen. - unsigned NumInstances; + unsigned NumInstances = 0; /// NumBits - The total size in bits of all of these blocks. - uint64_t NumBits; + uint64_t NumBits = 0; /// NumSubBlocks - The total number of blocks these blocks contain. - unsigned NumSubBlocks; + unsigned NumSubBlocks = 0; /// NumAbbrevs - The total number of abbreviations. - unsigned NumAbbrevs; + unsigned NumAbbrevs = 0; /// NumRecords - The total number of records these blocks contain, and the /// number that are abbreviated. - unsigned NumRecords, NumAbbreviatedRecords; + unsigned NumRecords = 0, NumAbbreviatedRecords = 0; /// CodeFreq - Keep track of the number of times we see each code. std::vector CodeFreq; - PerBlockIDStats() - : NumInstances(0), NumBits(0), NumSubBlocks(0), NumAbbrevs(0), - NumRecords(0), NumAbbreviatedRecords(0) {} + PerBlockIDStats() = default; }; std::map BlockIDStats; -- 2.7.4