LLVM  11.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::GCOVFunction Class Reference

GCOVFunction - Collects function information. More...

#include "llvm/ProfileData/GCOV.h"

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

Public Types

using BlockIterator = pointee_iterator< SmallVectorImpl< std::unique_ptr< GCOVBlock > >::const_iterator >
 

Public Member Functions

 GCOVFunction (GCOVFile &file)
 
StringRef getName () const
 
StringRef getFilename () const
 
size_t getNumBlocks () const
 
uint64_t getEntryCount () const
 getEntryCount - Get the number of times the function was called by retrieving the entry block's count. More...
 
uint64_t getExitCount () const
 getExitCount - Get the number of times the function returned by retrieving the exit block's count. More...
 
BlockIterator block_begin () const
 
BlockIterator block_end () const
 
iterator_range< BlockIteratorblocks () const
 
void print (raw_ostream &OS) const
 
void dump () const
 dump - Dump GCOVFunction content to dbgs() for debugging purposes. More...
 
void collectLineCounts (FileInfo &FI)
 collectLineCounts - Collect line counts. More...
 

Public Attributes

GCOVFilefile
 
uint32_t ident = 0
 
uint32_t linenoChecksum
 
uint32_t cfgChecksum = 0
 
uint32_t startLine = 0
 
uint32_t startColumn = 0
 
uint32_t endLine = 0
 
uint32_t endColumn = 0
 
uint8_t artificial = 0
 
StringRef Name
 
unsigned srcIdx
 
SmallVector< std::unique_ptr< GCOVBlock >, 0 > Blocks
 
SmallVector< std::unique_ptr< GCOVArc >, 0 > arcs
 
SmallVector< std::unique_ptr< GCOVArc >, 0 > treeArcs
 

Detailed Description

GCOVFunction - Collects function information.

Definition at line 226 of file GCOV.h.

Member Typedef Documentation

◆ BlockIterator

Definition at line 229 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVFunction()

llvm::GCOVFunction::GCOVFunction ( GCOVFile file)
inline

Definition at line 231 of file GCOV.h.

Member Function Documentation

◆ block_begin()

BlockIterator llvm::GCOVFunction::block_begin ( ) const
inline

Definition at line 239 of file GCOV.h.

◆ block_end()

BlockIterator llvm::GCOVFunction::block_end ( ) const
inline

Definition at line 240 of file GCOV.h.

◆ blocks()

iterator_range<BlockIterator> llvm::GCOVFunction::blocks ( ) const
inline

Definition at line 241 of file GCOV.h.

References llvm::dump(), llvm::make_range(), and print().

◆ collectLineCounts()

void GCOVFunction::collectLineCounts ( FileInfo FI)

collectLineCounts - Collect line counts.

This must be used after reading .gcno and .gcda files.

Definition at line 294 of file GCOV.cpp.

References llvm::FileInfo::addFunctionLine(), and getFilename().

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

◆ dump()

LLVM_DUMP_METHOD void GCOVFunction::dump ( ) const

dump - Dump GCOVFunction content to dbgs() for debugging purposes.

Definition at line 289 of file GCOV.cpp.

References llvm::dbgs(), and llvm::GCOVFile::print().

◆ getEntryCount()

uint64_t GCOVFunction::getEntryCount ( ) const

getEntryCount - Get the number of times the function was called by retrieving the entry block's count.

Definition at line 270 of file GCOV.cpp.

Referenced by llvm::FileInfo::print().

◆ getExitCount()

uint64_t GCOVFunction::getExitCount ( ) const

getExitCount - Get the number of times the function returned by retrieving the exit block's count.

Definition at line 276 of file GCOV.cpp.

◆ getFilename()

StringRef GCOVFunction::getFilename ( ) const

Definition at line 266 of file GCOV.cpp.

References file.

◆ getName()

StringRef llvm::GCOVFunction::getName ( ) const
inline

Definition at line 233 of file GCOV.h.

References getFilename(), and Name.

Referenced by llvm::FileInfo::print().

◆ getNumBlocks()

size_t llvm::GCOVFunction::getNumBlocks ( ) const
inline

Definition at line 235 of file GCOV.h.

◆ print()

void GCOVFunction::print ( raw_ostream OS) const

Definition at line 280 of file GCOV.cpp.

References getFilename(), and Name.

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

Member Data Documentation

◆ arcs

SmallVector<std::unique_ptr<GCOVArc>, 0> llvm::GCOVFunction::arcs

Definition at line 261 of file GCOV.h.

Referenced by llvm::GCOVFile::readGCDA(), and llvm::GCOVFile::readGCNO().

◆ artificial

uint8_t llvm::GCOVFunction::artificial = 0

Definition at line 257 of file GCOV.h.

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

◆ Blocks

SmallVector<std::unique_ptr<GCOVBlock>, 0> llvm::GCOVFunction::Blocks

Definition at line 260 of file GCOV.h.

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

◆ cfgChecksum

uint32_t llvm::GCOVFunction::cfgChecksum = 0

Definition at line 252 of file GCOV.h.

Referenced by llvm::GCOVFile::readGCDA(), and llvm::GCOVFile::readGCNO().

◆ endColumn

uint32_t llvm::GCOVFunction::endColumn = 0

Definition at line 256 of file GCOV.h.

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

◆ endLine

uint32_t llvm::GCOVFunction::endLine = 0

Definition at line 255 of file GCOV.h.

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

◆ file

GCOVFile& llvm::GCOVFunction::file

Definition at line 249 of file GCOV.h.

◆ ident

uint32_t llvm::GCOVFunction::ident = 0

Definition at line 250 of file GCOV.h.

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

◆ linenoChecksum

uint32_t llvm::GCOVFunction::linenoChecksum

Definition at line 251 of file GCOV.h.

Referenced by llvm::GCOVFile::readGCDA(), and llvm::GCOVFile::readGCNO().

◆ Name

StringRef llvm::GCOVFunction::Name

◆ srcIdx

unsigned llvm::GCOVFunction::srcIdx

Definition at line 259 of file GCOV.h.

Referenced by llvm::GCOVFile::collectLineCounts(), and llvm::GCOVFile::readGCNO().

◆ startColumn

uint32_t llvm::GCOVFunction::startColumn = 0

Definition at line 254 of file GCOV.h.

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

◆ startLine

uint32_t llvm::GCOVFunction::startLine = 0

Definition at line 253 of file GCOV.h.

Referenced by llvm::FileInfo::print(), and llvm::GCOVFile::readGCNO().

◆ treeArcs

SmallVector<std::unique_ptr<GCOVArc>, 0> llvm::GCOVFunction::treeArcs

Definition at line 261 of file GCOV.h.

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


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