LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::coverage::FunctionRecord Struct Reference

Code coverage information for a single function. More...

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

Public Member Functions

 FunctionRecord (StringRef Name, ArrayRef< StringRef > Filenames)
 
 FunctionRecord (FunctionRecord &&FR)=default
 
FunctionRecordoperator= (FunctionRecord &&)=default
 
void pushMCDCRecord (MCDCRecord &&Record)
 
void pushRegion (CounterMappingRegion Region, uint64_t Count, uint64_t FalseCount, bool HasSingleByteCoverage)
 

Public Attributes

std::string Name
 Raw function name.
 
std::vector< std::string > Filenames
 Mapping from FileID (i.e.
 
std::vector< CountedRegionCountedRegions
 Regions in the function along with their counts.
 
std::vector< CountedRegionCountedBranchRegions
 Branch Regions in the function along with their counts.
 
std::vector< MCDCRecordMCDCRecords
 MCDC Records record a DecisionRegion and associated BranchRegions.
 
uint64_t ExecutionCount = 0
 The number of times this function was executed.
 

Detailed Description

Code coverage information for a single function.

Definition at line 689 of file CoverageMapping.h.

Constructor & Destructor Documentation

◆ FunctionRecord() [1/2]

llvm::coverage::FunctionRecord::FunctionRecord ( StringRef  Name,
ArrayRef< StringRef Filenames 
)
inline

Definition at line 708 of file CoverageMapping.h.

◆ FunctionRecord() [2/2]

llvm::coverage::FunctionRecord::FunctionRecord ( FunctionRecord &&  FR)
default

Member Function Documentation

◆ operator=()

FunctionRecord & llvm::coverage::FunctionRecord::operator= ( FunctionRecord &&  )
default

◆ pushMCDCRecord()

void llvm::coverage::FunctionRecord::pushMCDCRecord ( MCDCRecord &&  Record)
inline

Definition at line 714 of file CoverageMapping.h.

References MCDCRecords.

◆ pushRegion()

void llvm::coverage::FunctionRecord::pushRegion ( CounterMappingRegion  Region,
uint64_t  Count,
uint64_t  FalseCount,
bool  HasSingleByteCoverage 
)
inline

Member Data Documentation

◆ CountedBranchRegions

std::vector<CountedRegion> llvm::coverage::FunctionRecord::CountedBranchRegions

Branch Regions in the function along with their counts.

Definition at line 702 of file CoverageMapping.h.

Referenced by pushRegion().

◆ CountedRegions

std::vector<CountedRegion> llvm::coverage::FunctionRecord::CountedRegions

Regions in the function along with their counts.

Definition at line 700 of file CoverageMapping.h.

Referenced by pushRegion().

◆ ExecutionCount

uint64_t llvm::coverage::FunctionRecord::ExecutionCount = 0

The number of times this function was executed.

Definition at line 706 of file CoverageMapping.h.

Referenced by pushRegion().

◆ Filenames

std::vector<std::string> llvm::coverage::FunctionRecord::Filenames

Mapping from FileID (i.e.

vector index) to filename. Used to support macro expansions within a function in which the macro and function are defined in separate files.

TODO: Uniquing filenames across all function records may be a performance optimization.

Definition at line 698 of file CoverageMapping.h.

◆ MCDCRecords

std::vector<MCDCRecord> llvm::coverage::FunctionRecord::MCDCRecords

MCDC Records record a DecisionRegion and associated BranchRegions.

Definition at line 704 of file CoverageMapping.h.

Referenced by pushMCDCRecord().

◆ Name

std::string llvm::coverage::FunctionRecord::Name

Raw function name.

Definition at line 691 of file CoverageMapping.h.


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