LLVM  8.0.1
Public Types | Public Member Functions | List of all members
llvm::GCOVFunction Class Reference

GCOVFunction - Collects function information. More...

#include "llvm/ProfileData/GCOV.h"

Public Types

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

Public Member Functions

 GCOVFunction (GCOVFile &P)
 
bool readGCNO (GCOVBuffer &Buffer, GCOV::GCOVVersion Version)
 readGCNO - Read a function from the GCNO buffer. More...
 
bool readGCDA (GCOVBuffer &Buffer, GCOV::GCOVVersion Version)
 readGCDA - Read a function from the GCDA buffer. More...
 
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...
 

Detailed Description

GCOVFunction - Collects function information.

Definition at line 275 of file GCOV.h.

Member Typedef Documentation

◆ BlockIterator

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

Definition at line 278 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVFunction()

llvm::GCOVFunction::GCOVFunction ( GCOVFile P)
inline

Definition at line 280 of file GCOV.h.

References llvm::IndexedInstrProf::Version.

Member Function Documentation

◆ block_begin()

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

Definition at line 290 of file GCOV.h.

◆ block_end()

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

Definition at line 291 of file GCOV.h.

◆ blocks()

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

Definition at line 292 of file GCOV.h.

References llvm::dump(), llvm::make_range(), Name, 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 365 of file GCOV.cpp.

References llvm::FileInfo::addFunctionLine().

◆ dump()

LLVM_DUMP_METHOD void GCOVFunction::dump ( ) const

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

Definition at line 360 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 341 of file GCOV.cpp.

◆ 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 347 of file GCOV.cpp.

◆ getFilename()

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

Definition at line 285 of file GCOV.h.

◆ getName()

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

Definition at line 284 of file GCOV.h.

References Name.

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

◆ getNumBlocks()

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

Definition at line 286 of file GCOV.h.

◆ print()

void GCOVFunction::print ( raw_ostream OS) const

Definition at line 351 of file GCOV.cpp.

References Name.

◆ readGCDA()

bool GCOVFunction::readGCDA ( GCOVBuffer Buff,
GCOV::GCOVVersion  Version 
)

readGCDA - Read a function from the GCDA buffer.

Return false if an error occurs.

Definition at line 254 of file GCOV.cpp.

References llvm::errs(), llvm::GCOVBuffer::getCursor(), Name, llvm::GCOVBuffer::readArcTag(), llvm::GCOVBuffer::readInt(), llvm::GCOVBuffer::readString(), and llvm::GCOV::V402.

◆ readGCNO()

bool GCOVFunction::readGCNO ( GCOVBuffer Buff,
GCOV::GCOVVersion  Version 
)

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