LLVM: llvm::coverage::MCDCRecord Struct Reference (original) (raw)

MCDC Record grouping all information together. More...

#include "[llvm/ProfileData/Coverage/CoverageMapping.h](CoverageMapping%5F8h%5Fsource.html)"

Public Types
enum CondState { MCDC_DontCare = -1 , MCDC_False = 0 , MCDC_True = 1 }
CondState represents the evaluation of a condition in an executed test vector, which can be True or False. More...
using TestVectors = llvm::SmallVector<std::pair<TestVector, CondState>>
using BoolVector = std::array<BitVector, 2>
using TVRowPair = std::pair<unsigned, unsigned>
using TVPairMap = llvm::DenseMap<unsigned, TVRowPair>
using CondIDMap = llvm::DenseMap<unsigned, unsigned>
using LineColPairMap = llvm::DenseMap<unsigned, LineColPair>
Public Member Functions
MCDCRecord (const CounterMappingRegion &Region, TestVectors &&TV, BoolVector &&Folded, CondIDMap &&PosToID, LineColPairMap &&CondLoc)
LLVM_ABI void findIndependencePairs ()
const CounterMappingRegion & getDecisionRegion () const
unsigned getNumConditions () const
unsigned getNumTestVectors () const
bool isCondFolded (unsigned Condition) const
CondState getTVCondition (unsigned TestVectorIndex, unsigned Condition)
Return the evaluation of a condition (indicated by Condition) in an executed test vector (indicated by TestVectorIndex), which will be True, False, or DontCare if the condition is unevaluatable.
std::pair< unsigned, unsigned > getDecisions () const
Return the number of True and False decisions for all executed test vectors.
CondState getTVResult (unsigned TestVectorIndex)
Return the Result evaluation for an executed test vector.
bool isConditionIndependencePairCovered (unsigned Condition) const
Determine whether a given condition (indicated by Condition) is covered by an Independence Pair.
TVRowPair getConditionIndependencePair (unsigned Condition)
Return the Independence Pair that covers the given condition.
float getPercentCovered () const
std::string getConditionHeaderString (unsigned Condition)
std::string getTestVectorHeaderString () const
std::string getTestVectorString (unsigned TestVectorIndex)
std::string getConditionCoverageString (unsigned Condition)

MCDC Record grouping all information together.

Definition at line 391 of file CoverageMapping.h.

BoolVector

CondIDMap

LineColPairMap

TestVectors

TVPairMap

TVRowPair

CondState

CondState represents the evaluation of a condition in an executed test vector, which can be True or False.

A DontCare is used to mask an unevaluatable condition resulting from short-circuit behavior of logical operators in languages like C/C++. When comparing the evaluation of a condition across executed test vectors, comparisons against a DontCare are effectively ignored.

Enumerator
MCDC_DontCare
MCDC_False
MCDC_True

Definition at line 398 of file CoverageMapping.h.

findIndependencePairs()

void MCDCRecord::findIndependencePairs ( )

getConditionCoverageString()

std::string llvm::coverage::MCDCRecord::getConditionCoverageString ( unsigned Condition) inline

getConditionHeaderString()

std::string llvm::coverage::MCDCRecord::getConditionHeaderString ( unsigned Condition) inline

getConditionIndependencePair()

TVRowPair llvm::coverage::MCDCRecord::getConditionIndependencePair ( unsigned Condition) inline

getDecisionRegion()

getDecisions()

std::pair< unsigned, unsigned > llvm::coverage::MCDCRecord::getDecisions ( ) const inline

getNumConditions()

unsigned llvm::coverage::MCDCRecord::getNumConditions ( ) const inline

getNumTestVectors()

unsigned llvm::coverage::MCDCRecord::getNumTestVectors ( ) const inline

getPercentCovered()

float llvm::coverage::MCDCRecord::getPercentCovered ( ) const inline

getTestVectorHeaderString()

std::string llvm::coverage::MCDCRecord::getTestVectorHeaderString ( ) const inline

getTestVectorString()

std::string llvm::coverage::MCDCRecord::getTestVectorString ( unsigned TestVectorIndex) inline

getTVCondition()

CondState llvm::coverage::MCDCRecord::getTVCondition ( unsigned TestVectorIndex, unsigned Condition ) inline

Return the evaluation of a condition (indicated by Condition) in an executed test vector (indicated by TestVectorIndex), which will be True, False, or DontCare if the condition is unevaluatable.

Because condition IDs are not associated based on their position in the expression, accessing conditions in the TestVectors requires a translation from a ordinal position to actual condition ID. This is done via PosToID[].

Definition at line 494 of file CoverageMapping.h.

Referenced by getTestVectorString().

getTVResult()

CondState llvm::coverage::MCDCRecord::getTVResult ( unsigned TestVectorIndex) inline

isCondFolded()

bool llvm::coverage::MCDCRecord::isCondFolded ( unsigned Condition) const inline

isConditionIndependencePairCovered()

bool llvm::coverage::MCDCRecord::isConditionIndependencePairCovered ( unsigned Condition) const inline

The documentation for this struct was generated from the following files: