[PATCH] D138847: MC/DC in LLVM Source-Based Code Coverage: llvm-cov visualization

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 02:52:58 PDT 2023


chapuni added a comment.

Thank you for the working and excuse my nitpicks.



================
Comment at: llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:268-269
+        : BitmapIdx(0), NumConditions(0), ID(ID), TrueID(TID), FalseID(FID) {}
+    MCDCParams(unsigned BIdx, unsigned NC, MCDC_Cond_ID ID,
+                    MCDC_Cond_ID TID, MCDC_Cond_ID FID)
+        : BitmapIdx(BIdx), NumConditions(NC), ID(ID), TrueID(TID),
----------------
Could this be reformatted?


================
Comment at: llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:573-574
+  /// counter was executed.
+  Expected<BitVector> evaluateBitmap(const CounterMappingRegion *MCDCDecision)
+      const;
+
----------------
Could this be reformatted?


================
Comment at: llvm/lib/ProfileData/Coverage/CoverageMapping.cpp:607-609
+        Expected<MCDCRecord> Record =
+            Ctx.evaluateMCDCRegion(*MCDCDecision, *ExecutedTestVectorBitmap,
+                                   MCDCBranches);
----------------
Could this be reformatted?


================
Comment at: llvm/test/tools/llvm-cov/mcdc-const.test:4
+// RUN: llvm-profdata merge %S/Inputs/mcdc-const.proftext -o %t.profdata
+// RUN: llvm-cov show --show-branches=count --show-mcdc %S/Inputs/mcdc-const.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/mcdc-const.cpp | FileCheck %s -check-prefix=CHECKGENERALCASE
+
----------------
I am afraid this would fail if LLVM is not configured for the arch of `mcdc-*.o`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138847/new/

https://reviews.llvm.org/D138847



More information about the llvm-commits mailing list