[llvm] [MC/DC] Introduce `class TestVector` with a pair of `BitVector` (PR #82174)

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 18 19:44:39 PST 2024


================
@@ -380,7 +380,70 @@ struct MCDCRecord {
   /// are effectively ignored.
   enum CondState { MCDC_DontCare = -1, MCDC_False = 0, MCDC_True = 1 };
 
-  using TestVector = llvm::SmallVector<CondState>;
+  /// Emulate SmallVector<CondState> with a pair of BitVector.
+  ///
+  ///          True  False DontCare (Impossible)
+  /// Values:  True  False False    True
+  /// Visited: True  True  False    False
+  class TestVector {
+    BitVector Values;  /// True/False (False when DontCare)
+    BitVector Visited; /// ~DontCare
+
+  public:
+    /// Assume filling DontCare.
----------------
ornata wrote:

Why do you need to pass Cond when it is not being used?

https://github.com/llvm/llvm-project/pull/82174


More information about the llvm-commits mailing list