[llvm] 47a12cc - CoverageMapping.cpp: s/MaxBitmapID/MaxBitmapIdx/ in getMaxBitmapSize()

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 23:14:43 PST 2024


Author: NAKAMURA Takumi
Date: 2024-02-06T16:13:02+09:00
New Revision: 47a12cca442cb52c33fc592183998f3b7bdd5094

URL: https://github.com/llvm/llvm-project/commit/47a12cca442cb52c33fc592183998f3b7bdd5094
DIFF: https://github.com/llvm/llvm-project/commit/47a12cca442cb52c33fc592183998f3b7bdd5094.diff

LOG: CoverageMapping.cpp: s/MaxBitmapID/MaxBitmapIdx/ in getMaxBitmapSize()

Added: 
    

Modified: 
    llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index 39e43f86eab5e..f2b4b5ce0b23f 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -491,20 +491,20 @@ static unsigned getMaxCounterID(const CounterMappingContext &Ctx,
 /// Returns the bit count
 static unsigned getMaxBitmapSize(const CounterMappingContext &Ctx,
                                  const CoverageMappingRecord &Record) {
-  unsigned MaxBitmapID = 0;
+  unsigned MaxBitmapIdx = 0;
   unsigned NumConditions = 0;
   // Scan max(BitmapIdx).
   // Note that `<=` is used insted of `<`, because `BitmapIdx == 0` is valid
-  // and `MaxBitmapID is `unsigned`. `BitmapIdx` is unique in the record.
+  // and `MaxBitmapIdx is `unsigned`. `BitmapIdx` is unique in the record.
   for (const auto &Region : reverse(Record.MappingRegions)) {
     if (Region.Kind == CounterMappingRegion::MCDCDecisionRegion &&
-        MaxBitmapID <= Region.MCDCParams.BitmapIdx) {
-      MaxBitmapID = Region.MCDCParams.BitmapIdx;
+        MaxBitmapIdx <= Region.MCDCParams.BitmapIdx) {
+      MaxBitmapIdx = Region.MCDCParams.BitmapIdx;
       NumConditions = Region.MCDCParams.NumConditions;
     }
   }
   unsigned SizeInBits = llvm::alignTo(uint64_t(1) << NumConditions, CHAR_BIT);
-  return MaxBitmapID * CHAR_BIT + SizeInBits;
+  return MaxBitmapIdx * CHAR_BIT + SizeInBits;
 }
 
 namespace {


        


More information about the llvm-commits mailing list