LLVM: llvm::coverage::CoverageMapping Class Reference (original) (raw)

The mapping of profile information to coverage data. More...

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

Public Member Functions
CoverageMapping (const CoverageMapping &)=delete
CoverageMapping & operator= (const CoverageMapping &)=delete
unsigned getMismatchedCount () const
The number of functions that couldn't have their profiles mapped.
ArrayRef< std::pair< std::string, uint64_t > > getHashMismatches () const
A hash mismatch occurs when a profile record for a symbol does not have the same hash as a coverage mapping record for the same symbol.
LLVM_ABI std::vector< StringRef > getUniqueSourceFiles () const
Returns a lexicographically sorted, unique list of files that are covered.
LLVM_ABI CoverageData getCoverageForFile (StringRef Filename) const
Get the coverage for a particular file.
LLVM_ABI CoverageData getCoverageForFunction (const FunctionRecord &Function) const
Get the coverage for a particular function.
LLVM_ABI CoverageData getCoverageForExpansion (const ExpansionRecord &Expansion) const
Get the coverage for an expansion within a coverage set.
iterator_range< FunctionRecordIterator > getCoveredFunctions () const
Gets all of the functions covered by this profile.
iterator_range< FunctionRecordIterator > getCoveredFunctions (StringRef Filename) const
Gets all of the functions in a particular file.
LLVM_ABI std::vector< InstantiationGroup > getInstantiationGroups (StringRef Filename) const
Get the list of function instantiation groups in a particular file.

The mapping of profile information to coverage data.

This is the main interface to get coverage information, using a profile to fill out execution counts.

Definition at line 991 of file CoverageMapping.h.

getCoverageForExpansion()

getCoverageForFile()

getCoverageForFunction()

getCoveredFunctions() [1/2]

getCoveredFunctions() [2/2]

getHashMismatches()

ArrayRef< std::pair< std::string, uint64_t > > llvm::coverage::CoverageMapping::getHashMismatches ( ) const inline

A hash mismatch occurs when a profile record for a symbol does not have the same hash as a coverage mapping record for the same symbol.

This returns a list of hash mismatches, where each mismatch is a pair of the symbol name and its coverage mapping hash.

Definition at line 1059 of file CoverageMapping.h.

getInstantiationGroups()

Get the list of function instantiation groups in a particular file.

Every instantiation group in a program is attributed to exactly one file: the file in which the definition for the common function begins.

Definition at line 1482 of file CoverageMapping.cpp.

References findMainViewFileID().

getMismatchedCount()

unsigned llvm::coverage::CoverageMapping::getMismatchedCount ( ) const inline

The number of functions that couldn't have their profiles mapped.

This is a count of functions whose profile is out of date or otherwise can't be associated with any coverage information.

Definition at line 1053 of file CoverageMapping.h.

getUniqueSourceFiles()

std::vector< StringRef > CoverageMapping::getUniqueSourceFiles ( ) const

load() [1/2]

load() [2/2]

Load the coverage mapping from the given object files and profile.

If Arches is non-empty, it must specify an architecture for each object. Ignores non-instrumented object files unless all are not instrumented.

Definition at line 1051 of file CoverageMapping.cpp.

References A(), B(), llvm::ArrayRef< T >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::IndexedInstrProfReader::create(), llvm::createFileError(), llvm::createStringError(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::enumerate(), llvm::object::BuildIDFetcher::fetch(), llvm::ArrayRef< T >::front(), llvm::join(), llvm::make_error(), llvm::coverage::no_data_found, llvm::no_such_file_or_directory, llvm::ArrayRef< T >::size(), llvm::sort(), and llvm::toHex().

operator=()


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