clang 20.0.0git
|
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) | |
CoverageSourceInfo & | getSourceInfo () 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. | |
CodeGenModule & | getCodeGenModule () |
Return an interface into CodeGenModule. | |
Static Public Member Functions | |
static CoverageSourceInfo * | setUpCoverageCallbacks (Preprocessor &PP) |
Organizes the cross-function state that is used while generating code coverage mapping data.
Definition at line 105 of file CoverageMappingGen.h.
CoverageMappingModuleGen::CoverageMappingModuleGen | ( | CodeGenModule & | CGM, |
CoverageSourceInfo & | SourceInfo | ||
) |
Definition at line 2408 of file CoverageMappingGen.cpp.
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 2491 of file CoverageMappingGen.cpp.
References dump(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping().
void CoverageMappingModuleGen::emit | ( | ) |
Emit the coverage mapping data for a translation unit.
Definition at line 2525 of file CoverageMappingGen.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), getInstrProfSection(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenModule::getModule().
|
inline |
Return an interface into CodeGenModule.
Definition at line 152 of file CoverageMappingGen.h.
unsigned CoverageMappingModuleGen::getFileID | ( | FileEntryRef | File | ) |
Return the coverage mapping translation unit file id for the given file.
Definition at line 2597 of file CoverageMappingGen.cpp.
References clang::File.
|
inline |
Definition at line 132 of file CoverageMappingGen.h.
|
static |
Definition at line 61 of file CoverageMappingGen.cpp.
References clang::Preprocessor::addCommentHandler(), clang::Preprocessor::addPPCallbacks(), EmptyLineCommentCoverage(), clang::Token::getKind(), clang::Token::getLocation(), clang::Preprocessor::getSourceManager(), clang::CoverageSourceInfo::PrevTokLoc, clang::Preprocessor::setEmptylineHandler(), clang::Preprocessor::setPreprocessToken(), clang::Preprocessor::setTokenWatcher(), and clang::CoverageSourceInfo::updateNextTokLoc().
Referenced by clang::CodeGenAction::CreateASTConsumer().