LLVM 18.0.0git
Public Member Functions | List of all members
llvm::coverage::CounterMappingContext Class Reference

A Counter mapping context is used to connect the counters, expressions and the obtained counter values. More...

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

Public Member Functions

 CounterMappingContext (ArrayRef< CounterExpression > Expressions, ArrayRef< uint64_t > CounterValues=std::nullopt)
 
void setCounts (ArrayRef< uint64_t > Counts)
 
void setBitmapBytes (ArrayRef< uint8_t > Bytes)
 
void dump (const Counter &C, raw_ostream &OS) const
 
void dump (const Counter &C) const
 
Expected< int64_t > evaluate (const Counter &C) const
 Return the number of times that a region of code associated with this counter was executed.
 
Expected< BitVectorevaluateBitmap (const CounterMappingRegion *MCDCDecision) const
 Return the number of times that a region of code associated with this counter was executed.
 
Expected< MCDCRecordevaluateMCDCRegion (CounterMappingRegion Region, BitVector Bitmap, ArrayRef< CounterMappingRegion > Branches)
 Return an MCDC record that indicates executed test vectors and condition pairs.
 
unsigned getMaxCounterID (const Counter &C) const
 

Detailed Description

A Counter mapping context is used to connect the counters, expressions and the obtained counter values.

Definition at line 544 of file CoverageMapping.h.

Constructor & Destructor Documentation

◆ CounterMappingContext()

llvm::coverage::CounterMappingContext::CounterMappingContext ( ArrayRef< CounterExpression Expressions,
ArrayRef< uint64_t CounterValues = std::nullopt 
)
inline

Definition at line 550 of file CoverageMapping.h.

Member Function Documentation

◆ dump() [1/2]

void llvm::coverage::CounterMappingContext::dump ( const Counter C) const
inline

Definition at line 558 of file CoverageMapping.h.

References llvm::CallingConv::C, llvm::dbgs(), and dump().

Referenced by dump().

◆ dump() [2/2]

void CounterMappingContext::dump ( const Counter C,
raw_ostream OS 
) const

◆ evaluate()

Expected< int64_t > CounterMappingContext::evaluate ( const Counter C) const

◆ evaluateBitmap()

Expected< BitVector > CounterMappingContext::evaluateBitmap ( const CounterMappingRegion MCDCDecision) const

◆ evaluateMCDCRegion()

Expected< MCDCRecord > CounterMappingContext::evaluateMCDCRegion ( CounterMappingRegion  Region,
BitVector  Bitmap,
ArrayRef< CounterMappingRegion Branches 
)

Return an MCDC record that indicates executed test vectors and condition pairs.

Definition at line 434 of file CoverageMapping.cpp.

References MCDCRecordProcessor::processMCDCRecord().

◆ getMaxCounterID()

unsigned CounterMappingContext::getMaxCounterID ( const Counter C) const

◆ setBitmapBytes()

void llvm::coverage::CounterMappingContext::setBitmapBytes ( ArrayRef< uint8_t >  Bytes)
inline

Definition at line 555 of file CoverageMapping.h.

◆ setCounts()

void llvm::coverage::CounterMappingContext::setCounts ( ArrayRef< uint64_t Counts)
inline

Definition at line 554 of file CoverageMapping.h.


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