LLVM  11.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"

Collaboration diagram for llvm::coverage::FunctionRecord:
Collaboration graph

Public Member Functions

 FunctionRecord (StringRef Name, ArrayRef< StringRef > Filenames)
 FunctionRecord (FunctionRecord &&FR)=default
FunctionRecordoperator= (FunctionRecord &&)=default
void pushRegion (CounterMappingRegion Region, uint64_t Count)

Public Attributes

std::string Name
 Raw function name. More...
std::vector< std::string > Filenames
 Mapping from FileID (i.e. More...
std::vector< CountedRegionCountedRegions
 Regions in the function along with their counts. More...
uint64_t ExecutionCount = 0
 The number of times this function was executed. More...

Detailed Description

Code coverage information for a single function.

Definition at line 302 of file CoverageMapping.h.

Constructor & Destructor Documentation

◆ FunctionRecord() [1/2]

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

Definition at line 317 of file CoverageMapping.h.

◆ FunctionRecord() [2/2]

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

Member Function Documentation

◆ operator=()

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

◆ pushRegion()

void llvm::coverage::FunctionRecord::pushRegion ( CounterMappingRegion  Region,
uint64_t  Count 

Definition at line 323 of file CoverageMapping.h.

Referenced by llvm::coverage::CounterMappingContext::evaluate().

Member Data Documentation

◆ CountedRegions

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

◆ ExecutionCount

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

The number of times this function was executed.

Definition at line 315 of file CoverageMapping.h.

◆ 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 311 of file CoverageMapping.h.

Referenced by findMainViewFileID(), gatherFileIDs(), llvm::coverage::CoverageMapping::getCoverageForExpansion(), and llvm::coverage::CoverageMapping::getCoverageForFunction().

◆ Name

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

Raw function name.

Definition at line 304 of file CoverageMapping.h.

Referenced by llvm::coverage::CoverageMapping::getCoverageForFunction().

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