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

#include "llvm/ProfileData/GCOV.h"

Collaboration diagram for llvm::FileInfo:
Collaboration graph


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, GCOVFile &file)
 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 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
FuncCoverageMap FuncCoverages
std::vector< SourceInfosources


class GCOVFile

Detailed Description

Definition at line 346 of file GCOV.h.

Member Typedef Documentation

◆ BlockLines

Definition at line 356 of file GCOV.h.

◆ BlockVector

Definition at line 355 of file GCOV.h.

◆ FuncCoverageMap

Definition at line 408 of file GCOV.h.

◆ FunctionLines

Definition at line 354 of file GCOV.h.

◆ FunctionVector

Definition at line 353 of file GCOV.h.

Constructor & Destructor Documentation

◆ FileInfo()

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

Definition at line 368 of file GCOV.h.

Referenced by llvm::pruneCache().

Member Function Documentation

◆ addBlockLine()

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

Definition at line 370 of file GCOV.h.

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

◆ addFunctionLine()

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

Definition at line 376 of file GCOV.h.

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

◆ getCoveragePath()

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

◆ openCoveragePath()

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

Definition at line 607 of file GCOV.cpp.

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

◆ print()

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

◆ printBlockInfo()

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

printBlockInfo - Output counts for each block.

Definition at line 806 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 

◆ printCoverage()

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

◆ printFileCoverage()

void FileInfo::printFileCoverage ( raw_ostream OS) const

Definition at line 885 of file GCOV.cpp.

References llvm::GCOVCoverage::Name.

◆ printFuncCoverage()

void FileInfo::printFuncCoverage ( raw_ostream OS) const

Definition at line 875 of file GCOV.cpp.

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

◆ printFunctionSummary()

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

printFunctionSummary - Print function and block summary.

Definition at line 789 of file GCOV.cpp.

References safeDiv().

◆ printUncondBranchInfo()

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

printUncondBranchInfo - Print unconditional branch probabilities.

Definition at line 846 of file GCOV.cpp.

References llvm::format().

◆ setProgramCount()

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

Definition at line 384 of file GCOV.h.

References file, and print().

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

◆ setRunCount()

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

Definition at line 383 of file GCOV.h.

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

Friends And Related Function Documentation

◆ GCOVFile

friend class GCOVFile

Definition at line 367 of file GCOV.h.

Member Data Documentation

◆ FuncCoverages

FuncCoverageMap llvm::FileInfo::FuncCoverages

Definition at line 410 of file GCOV.h.

◆ LineInfo

StringMap<LineData> llvm::FileInfo::LineInfo

Definition at line 404 of file GCOV.h.

◆ Options

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

Definition at line 403 of file GCOV.h.

◆ ProgramCount

uint32_t llvm::FileInfo::ProgramCount = 0

Definition at line 406 of file GCOV.h.

◆ RunCount

uint32_t llvm::FileInfo::RunCount = 0

Definition at line 405 of file GCOV.h.

◆ sources

std::vector<SourceInfo> llvm::FileInfo::sources

Definition at line 411 of file GCOV.h.

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

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