LLVM 19.0.0git
Public Member Functions | List of all members
llvm::coverage::MCDCRecord::TestVector Class Reference

Emulate SmallVector<CondState> with a pair of BitVector. More...

#include "llvm/ProfileData/Coverage/CoverageMapping.h"

Public Member Functions

 TestVector (unsigned N)
 ~DontCare
 
CondState operator[] (int I) const
 Emulate RHS SmallVector::operator[].
 
auto getIndex () const
 Equivalent to buildTestVector's Index.
 
void set (int I, CondState Val)
 Set the condition Val at position I.
 
void push_back (CondState Val)
 Emulate SmallVector::push_back.
 
auto getDifferences (const TestVector &B) const
 For each element:
 

Detailed Description

Emulate SmallVector<CondState> with a pair of BitVector.

     True  False DontCare (Impossible)

Values: True False False True Visited: True True False False

Definition at line 392 of file CoverageMapping.h.

Constructor & Destructor Documentation

◆ TestVector()

llvm::coverage::MCDCRecord::TestVector::TestVector ( unsigned  N)
inline

~DontCare

Default values are filled with DontCare.

Definition at line 398 of file CoverageMapping.h.

Member Function Documentation

◆ getDifferences()

auto llvm::coverage::MCDCRecord::TestVector::getDifferences ( const TestVector B) const
inline

For each element:

  • False if either is DontCare
  • False if both have the same value
  • True if both have the opposite value ((A.Values ^ B.Values) & A.Visited & B.Visited) Dedicated to findIndependencePairs().

Definition at line 429 of file CoverageMapping.h.

References A, and B.

◆ getIndex()

auto llvm::coverage::MCDCRecord::TestVector::getIndex ( ) const
inline

Equivalent to buildTestVector's Index.

Definition at line 407 of file CoverageMapping.h.

References llvm::BitVector::getData().

◆ operator[]()

CondState llvm::coverage::MCDCRecord::TestVector::operator[] ( int  I) const
inline

◆ push_back()

void llvm::coverage::MCDCRecord::TestVector::push_back ( CondState  Val)
inline

◆ set()

void llvm::coverage::MCDCRecord::TestVector::set ( int  I,
CondState  Val 
)
inline

Set the condition Val at position I.

This emulates LHS SmallVector::operator[].

Definition at line 411 of file CoverageMapping.h.

References I, llvm::coverage::MCDCRecord::MCDC_DontCare, and llvm::coverage::MCDCRecord::MCDC_True.


The documentation for this class was generated from the following file: