[Bitcode] Modernize PerBlockIDStats (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 27 May 2023 17:29:21 +0000 (10:29 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 27 May 2023 17:29:21 +0000 (10:29 -0700)
llvm/include/llvm/Bitcode/BitcodeAnalyzer.h

index 63ecf85..33a2949 100644 (file)
@@ -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<PerRecordStats> CodeFreq;
-    PerBlockIDStats()
-        : NumInstances(0), NumBits(0), NumSubBlocks(0), NumAbbrevs(0),
-          NumRecords(0), NumAbbreviatedRecords(0) {}
+    PerBlockIDStats() = default;
   };
 
   std::map<unsigned, PerBlockIDStats> BlockIDStats;