LLVM  14.0.0git
Functions
llvm::coverage::accessors Namespace Reference

This namespace defines accessors shared by different versions of coverage mapping records. More...

Functions

template<class FuncRecordTy , support::endianness Endian>
uint64_t getFuncHash (const FuncRecordTy *Record)
 Return the structural hash associated with the function. More...
 
template<class FuncRecordTy , support::endianness Endian>
uint64_t getDataSize (const FuncRecordTy *Record)
 Return the coverage map data size for the function. More...
 
template<class FuncRecordTy , support::endianness Endian>
uint64_t getFuncNameRef (const FuncRecordTy *Record)
 Return the function lookup key. The value is considered opaque. More...
 
template<class FuncRecordTy , support::endianness Endian>
Error getFuncNameViaRef (const FuncRecordTy *Record, InstrProfSymtab &ProfileNames, StringRef &FuncName)
 Return the PGO name of the function. More...
 
template<class FuncRecordTy , support::endianness Endian>
StringRef getCoverageMappingOutOfLine (const FuncRecordTy *Record, const char *MappingBuf)
 Read coverage mapping out-of-line, from MappingBuf. More...
 
template<class FuncRecordTy , support::endianness Endian>
std::pair< const char *, const FuncRecordTy * > advanceByOneOutOfLine (const FuncRecordTy *Record, const char *MappingBuf)
 Advance to the next out-of-line coverage mapping and its associated function record. More...
 

Detailed Description

This namespace defines accessors shared by different versions of coverage mapping records.

Function Documentation

◆ advanceByOneOutOfLine()

template<class FuncRecordTy , support::endianness Endian>
std::pair<const char *, const FuncRecordTy *> llvm::coverage::accessors::advanceByOneOutOfLine ( const FuncRecordTy *  Record,
const char *  MappingBuf 
)

Advance to the next out-of-line coverage mapping and its associated function record.

Definition at line 813 of file CoverageMapping.h.

◆ getCoverageMappingOutOfLine()

template<class FuncRecordTy , support::endianness Endian>
StringRef llvm::coverage::accessors::getCoverageMappingOutOfLine ( const FuncRecordTy *  Record,
const char *  MappingBuf 
)

Read coverage mapping out-of-line, from MappingBuf.

This is used when the coverage mapping is attached to the file header, instead of to the function record.

Definition at line 804 of file CoverageMapping.h.

◆ getDataSize()

template<class FuncRecordTy , support::endianness Endian>
uint64_t llvm::coverage::accessors::getDataSize ( const FuncRecordTy *  Record)

Return the coverage map data size for the function.

Definition at line 780 of file CoverageMapping.h.

◆ getFuncHash()

template<class FuncRecordTy , support::endianness Endian>
uint64_t llvm::coverage::accessors::getFuncHash ( const FuncRecordTy *  Record)

Return the structural hash associated with the function.

Definition at line 774 of file CoverageMapping.h.

◆ getFuncNameRef()

template<class FuncRecordTy , support::endianness Endian>
uint64_t llvm::coverage::accessors::getFuncNameRef ( const FuncRecordTy *  Record)

Return the function lookup key. The value is considered opaque.

Definition at line 786 of file CoverageMapping.h.

◆ getFuncNameViaRef()

template<class FuncRecordTy , support::endianness Endian>
Error llvm::coverage::accessors::getFuncNameViaRef ( const FuncRecordTy *  Record,
InstrProfSymtab ProfileNames,
StringRef FuncName 
)

Return the PGO name of the function.

Used for formats in which the name is a hash.

Definition at line 793 of file CoverageMapping.h.

References llvm::InstrProfSymtab::getFuncName(), and llvm::Error::success().