class CoverageMappingModuleGen
Declaration
class CoverageMappingModuleGen { /* full declaration omitted */ };
Description
Organizes the cross-function state that is used while generating code coverage mapping data.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:96
Member Variables
- private clang::CodeGen::CodeGenModule& CGM
- private clang::CoverageSourceInfo& SourceInfo
- private llvm::SmallDenseMap<const FileEntry*, unsigned int, 8> FileEntries
- private std::vector<llvm::Constant*> FunctionNames
- private std::vector<FunctionInfo> FunctionRecords
- private std::map<std::string, std::string> CoveragePrefixMap
Method Overview
- public CoverageMappingModuleGen(clang::CodeGen::CodeGenModule & CGM, clang::CoverageSourceInfo & SourceInfo)
- public void addFunctionMappingRecord(llvm::GlobalVariable * FunctionName, llvm::StringRef FunctionNameValue, uint64_t FunctionHash, const std::string & CoverageMapping, bool IsUsed = true)
- public void emit()
- private void emitFunctionMappingRecord(const clang::CodeGen::CoverageMappingModuleGen::FunctionInfo & Info, uint64_t FilenamesRef)
- public clang::CodeGen::CodeGenModule & getCodeGenModule()
- private std::string getCurrentDirname()
- public unsigned int getFileID(const clang::FileEntry * File)
- public clang::CoverageSourceInfo & getSourceInfo() const
- private std::string normalizeFilename(llvm::StringRef Filename)
- public static clang::CoverageSourceInfo * setUpCoverageCallbacks(clang::Preprocessor & PP)
Methods
¶CoverageMappingModuleGen(
clang::CodeGen::CodeGenModule& CGM,
clang::CoverageSourceInfo& SourceInfo)
CoverageMappingModuleGen(
clang::CodeGen::CodeGenModule& CGM,
clang::CoverageSourceInfo& SourceInfo)
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:122
Parameters
- clang::CodeGen::CodeGenModule& CGM
- clang::CoverageSourceInfo& SourceInfo
¶void addFunctionMappingRecord(
llvm::GlobalVariable* FunctionName,
llvm::StringRef FunctionNameValue,
uint64_t FunctionHash,
const std::string& CoverageMapping,
bool IsUsed = true)
void addFunctionMappingRecord(
llvm::GlobalVariable* FunctionName,
llvm::StringRef FunctionNameValue,
uint64_t FunctionHash,
const std::string& CoverageMapping,
bool IsUsed = true)
Description
Add a function's coverage mapping record to the collection of the function mapping records.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:130
Parameters
- llvm::GlobalVariable* FunctionName
- llvm::StringRef FunctionNameValue
- uint64_t FunctionHash
- const std::string& CoverageMapping
- bool IsUsed = true
¶void emit()
void emit()
Description
Emit the coverage mapping data for a translation unit.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:137
¶void emitFunctionMappingRecord(
const clang::CodeGen::
CoverageMappingModuleGen::FunctionInfo&
Info,
uint64_t FilenamesRef)
void emitFunctionMappingRecord(
const clang::CodeGen::
CoverageMappingModuleGen::FunctionInfo&
Info,
uint64_t FilenamesRef)
Description
Emit a function record.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:116
Parameters
- const clang::CodeGen::CoverageMappingModuleGen:: FunctionInfo& Info
- uint64_t FilenamesRef
¶clang::CodeGen::CodeGenModule& getCodeGenModule()
clang::CodeGen::CodeGenModule& getCodeGenModule()
Description
Return an interface into CodeGenModule.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:144
¶std::string getCurrentDirname()
std::string getCurrentDirname()
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:112
¶unsigned int getFileID(
const clang::FileEntry* File)
unsigned int getFileID(
const clang::FileEntry* File)
Description
Return the coverage mapping translation unit file id for the given file.
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:141
Parameters
- const clang::FileEntry* File
¶clang::CoverageSourceInfo& getSourceInfo() const
clang::CoverageSourceInfo& getSourceInfo() const
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:124
¶std::string normalizeFilename(
llvm::StringRef Filename)
std::string normalizeFilename(
llvm::StringRef Filename)
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:113
Parameters
- llvm::StringRef Filename
¶static clang::CoverageSourceInfo*
setUpCoverageCallbacks(clang::Preprocessor& PP)
static clang::CoverageSourceInfo*
setUpCoverageCallbacks(clang::Preprocessor& PP)
Declared at: clang/lib/CodeGen/CoverageMappingGen.h:120