clang 19.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
clang::CodeGen::CoverageMappingModuleGen Class Reference

Organizes the cross-function state that is used while generating code coverage mapping data. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CoverageMappingGen.h"

Public Member Functions

 CoverageMappingModuleGen (CodeGenModule &CGM, CoverageSourceInfo &SourceInfo)
 
CoverageSourceInfogetSourceInfo () const
 
void addFunctionMappingRecord (llvm::GlobalVariable *FunctionName, StringRef FunctionNameValue, uint64_t FunctionHash, const std::string &CoverageMapping, bool IsUsed=true)
 Add a function's coverage mapping record to the collection of the function mapping records.
 
void emit ()
 Emit the coverage mapping data for a translation unit.
 
unsigned getFileID (FileEntryRef File)
 Return the coverage mapping translation unit file id for the given file.
 
CodeGenModulegetCodeGenModule ()
 Return an interface into CodeGenModule.
 

Static Public Member Functions

static CoverageSourceInfosetUpCoverageCallbacks (Preprocessor &PP)
 

Detailed Description

Organizes the cross-function state that is used while generating code coverage mapping data.

Definition at line 100 of file CoverageMappingGen.h.

Constructor & Destructor Documentation

◆ CoverageMappingModuleGen()

CoverageMappingModuleGen::CoverageMappingModuleGen ( CodeGenModule CGM,
CoverageSourceInfo SourceInfo 
)

Definition at line 2244 of file CoverageMappingGen.cpp.

Member Function Documentation

◆ addFunctionMappingRecord()

void CoverageMappingModuleGen::addFunctionMappingRecord ( llvm::GlobalVariable *  FunctionName,
StringRef  FunctionNameValue,
uint64_t  FunctionHash,
const std::string &  CoverageMapping,
bool  IsUsed = true 
)

Add a function's coverage mapping record to the collection of the function mapping records.

Definition at line 2327 of file CoverageMappingGen.cpp.

References dump(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().

Referenced by clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping().

◆ emit()

void CoverageMappingModuleGen::emit ( )

◆ getCodeGenModule()

CodeGenModule & clang::CodeGen::CoverageMappingModuleGen::getCodeGenModule ( )
inline

Return an interface into CodeGenModule.

Definition at line 147 of file CoverageMappingGen.h.

◆ getFileID()

unsigned CoverageMappingModuleGen::getFileID ( FileEntryRef  File)

Return the coverage mapping translation unit file id for the given file.

Definition at line 2433 of file CoverageMappingGen.cpp.

References clang::File.

◆ getSourceInfo()

CoverageSourceInfo & clang::CodeGen::CoverageMappingModuleGen::getSourceInfo ( ) const
inline

Definition at line 127 of file CoverageMappingGen.h.

◆ setUpCoverageCallbacks()

CoverageSourceInfo * CoverageMappingModuleGen::setUpCoverageCallbacks ( Preprocessor PP)
static

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