LLVM  8.0.1
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::FileInfo Class Reference

#include "llvm/ProfileData/GCOV.h"

Collaboration diagram for llvm::FileInfo:
Collaboration graph
[legend]

Classes

struct  GCOVCoverage
 
struct  LineData
 

Public Member Functions

 FileInfo (const GCOV::Options &Options)
 
void addBlockLine (StringRef Filename, uint32_t Line, const GCOVBlock *Block)
 
void addFunctionLine (StringRef Filename, uint32_t Line, const GCOVFunction *Function)
 
void setRunCount (uint32_t Runs)
 
void setProgramCount (uint32_t Programs)
 
void print (raw_ostream &OS, StringRef MainFilename, StringRef GCNOFile, StringRef GCDAFile)
 print - Print source files with collected line count information. More...
 

Protected Types

using FunctionVector = SmallVector< const GCOVFunction *, 1 >
 
using FunctionLines = DenseMap< uint32_t, FunctionVector >
 
using BlockVector = SmallVector< const GCOVBlock *, 4 >
 
using BlockLines = DenseMap< uint32_t, BlockVector >
 
using FileCoverageList = SmallVector< std::pair< std::string, GCOVCoverage >, 4 >
 
using FuncCoverageMap = MapVector< const GCOVFunction *, GCOVCoverage >
 

Protected Member Functions

std::string getCoveragePath (StringRef Filename, StringRef MainFilename)
 
std::unique_ptr< raw_ostreamopenCoveragePath (StringRef CoveragePath)
 
void printFunctionSummary (raw_ostream &OS, const FunctionVector &Funcs) const
 printFunctionSummary - Print function and block summary. More...
 
void printBlockInfo (raw_ostream &OS, const GCOVBlock &Block, uint32_t LineIndex, uint32_t &BlockNo) const
 printBlockInfo - Output counts for each block. More...
 
void printBranchInfo (raw_ostream &OS, const GCOVBlock &Block, GCOVCoverage &Coverage, uint32_t &EdgeNo)
 printBranchInfo - Print conditional branch probabilities. More...
 
void printUncondBranchInfo (raw_ostream &OS, uint32_t &EdgeNo, uint64_t Count) const
 printUncondBranchInfo - Print unconditional branch probabilities. More...
 
void printCoverage (raw_ostream &OS, const GCOVCoverage &Coverage) const
 
void printFuncCoverage (raw_ostream &OS) const
 
void printFileCoverage (raw_ostream &OS) const
 

Protected Attributes

const GCOV::OptionsOptions
 
StringMap< LineDataLineInfo
 
uint32_t RunCount = 0
 
uint32_t ProgramCount = 0
 
FileCoverageList FileCoverages
 
FuncCoverageMap FuncCoverages
 

Detailed Description

Definition at line 394 of file GCOV.h.

Member Typedef Documentation

◆ BlockLines

Definition at line 404 of file GCOV.h.

◆ BlockVector

Definition at line 403 of file GCOV.h.

◆ FileCoverageList

using llvm::FileInfo::FileCoverageList = SmallVector<std::pair<std::string, GCOVCoverage>, 4>
protected

Definition at line 468 of file GCOV.h.

◆ FuncCoverageMap

Definition at line 469 of file GCOV.h.

◆ FunctionLines

Definition at line 402 of file GCOV.h.

◆ FunctionVector

Definition at line 401 of file GCOV.h.

Constructor & Destructor Documentation

◆ FileInfo()

llvm::FileInfo::FileInfo ( const GCOV::Options Options)
inline

Definition at line 428 of file GCOV.h.

Referenced by llvm::pruneCache().

Member Function Documentation

◆ addBlockLine()

void llvm::FileInfo::addBlockLine ( StringRef  Filename,
uint32_t  Line,
const GCOVBlock Block 
)
inline

Definition at line 430 of file GCOV.h.

Referenced by llvm::GCOVBlock::collectLineCounts().

◆ addFunctionLine()

void llvm::FileInfo::addFunctionLine ( StringRef  Filename,
uint32_t  Line,
const GCOVFunction Function 
)
inline

Definition at line 436 of file GCOV.h.

Referenced by llvm::GCOVFunction::collectLineCounts().

◆ getCoveragePath()

std::string FileInfo::getCoveragePath ( StringRef  Filename,
StringRef  MainFilename 
)
protected

Definition at line 678 of file GCOV.cpp.

References llvm::StringRef::equals(), and mangleCoveragePath().

◆ openCoveragePath()

std::unique_ptr< raw_ostream > FileInfo::openCoveragePath ( StringRef  CoveragePath)
protected

Definition at line 695 of file GCOV.cpp.

References llvm::errs(), and llvm::sys::fs::F_Text.

◆ print()

void FileInfo::print ( raw_ostream OS,
StringRef  MainFilename,
StringRef  GCNOFile,
StringRef  GCDAFile 
)

◆ printBlockInfo()

void FileInfo::printBlockInfo ( raw_ostream OS,
const GCOVBlock Block,
uint32_t  LineIndex,
uint32_t BlockNo 
) const
protected

printBlockInfo - Output counts for each block.

Definition at line 843 of file GCOV.cpp.

References llvm::format(), and llvm::GCOVBlock::getCount().

◆ printBranchInfo()

void FileInfo::printBranchInfo ( raw_ostream OS,
const GCOVBlock Block,
GCOVCoverage Coverage,
uint32_t EdgeNo 
)
protected

◆ printCoverage()

void FileInfo::printCoverage ( raw_ostream OS,
const GCOVCoverage Coverage 
) const
protected

◆ printFileCoverage()

void FileInfo::printFileCoverage ( raw_ostream OS) const
protected

Definition at line 922 of file GCOV.cpp.

References R600_InstFlag::FC, and llvm::FileInfo::GCOVCoverage::Name.

◆ printFuncCoverage()

void FileInfo::printFuncCoverage ( raw_ostream OS) const
protected

Definition at line 912 of file GCOV.cpp.

References R600_InstFlag::FC, and llvm::FileInfo::GCOVCoverage::Name.

◆ printFunctionSummary()

void FileInfo::printFunctionSummary ( raw_ostream OS,
const FunctionVector Funcs 
) const
protected

printFunctionSummary - Print function and block summary.

Definition at line 826 of file GCOV.cpp.

References safeDiv().

◆ printUncondBranchInfo()

void FileInfo::printUncondBranchInfo ( raw_ostream OS,
uint32_t EdgeNo,
uint64_t  Count 
) const
protected

printUncondBranchInfo - Print unconditional branch probabilities.

Definition at line 883 of file GCOV.cpp.

References llvm::format().

◆ setProgramCount()

void llvm::FileInfo::setProgramCount ( uint32_t  Programs)
inline

Definition at line 444 of file GCOV.h.

References print().

Referenced by llvm::GCOVFile::collectLineCounts().

◆ setRunCount()

void llvm::FileInfo::setRunCount ( uint32_t  Runs)
inline

Definition at line 443 of file GCOV.h.

Referenced by llvm::GCOVFile::collectLineCounts().

Member Data Documentation

◆ FileCoverages

FileCoverageList llvm::FileInfo::FileCoverages
protected

Definition at line 471 of file GCOV.h.

◆ FuncCoverages

FuncCoverageMap llvm::FileInfo::FuncCoverages
protected

Definition at line 472 of file GCOV.h.

◆ LineInfo

StringMap<LineData> llvm::FileInfo::LineInfo
protected

Definition at line 464 of file GCOV.h.

◆ Options

const GCOV::Options& llvm::FileInfo::Options
protected

Definition at line 463 of file GCOV.h.

◆ ProgramCount

uint32_t llvm::FileInfo::ProgramCount = 0
protected

Definition at line 466 of file GCOV.h.

◆ RunCount

uint32_t llvm::FileInfo::RunCount = 0
protected

Definition at line 465 of file GCOV.h.


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