LLVM 19.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"

Public Types

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

Public Member Functions

 GCOVFunction (GCOVFile &file)
 
StringRef getName (bool demangle) const
 
StringRef getFilename () const
 
uint64_t getEntryCount () const
 getEntryCount - Get the number of times the function was called by retrieving the entry block's count.
 
GCOVBlockgetExitBlock () const
 
iterator_range< BlockIteratorblocksRange () const
 
void propagateCounts (const GCOVBlock &v, GCOVArc *pred)
 
void print (raw_ostream &OS) const
 
void dump () const
 dump - Dump GCOVFunction content to dbgs() for debugging purposes.
 

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
 
SmallString< 0 > demangled
 
unsigned srcIdx
 
SmallVector< std::unique_ptr< GCOVBlock >, 0 > blocks
 
SmallVector< std::unique_ptr< GCOVArc >, 0 > arcs
 
SmallVector< std::unique_ptr< GCOVArc >, 0 > treeArcs
 
DenseSet< const GCOVBlock * > visited
 

Detailed Description

GCOVFunction - Collects function information.

Definition at line 236 of file GCOV.h.

Member Typedef Documentation

◆ BlockIterator

Definition at line 238 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVFunction()

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

Definition at line 241 of file GCOV.h.

Member Function Documentation

◆ blocksRange()

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

Definition at line 248 of file GCOV.h.

References blocks, and llvm::make_range().

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

◆ dump()

LLVM_DUMP_METHOD void GCOVFunction::dump ( ) const

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

Definition at line 433 of file GCOV.cpp.

References llvm::dbgs(), and 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 357 of file GCOV.cpp.

References blocks.

◆ getExitBlock()

GCOVBlock & GCOVFunction::getExitBlock ( ) const

Definition at line 361 of file GCOV.cpp.

References blocks, file, llvm::GCOVFile::getVersion(), and llvm::GCOV::V408.

◆ getFilename()

StringRef GCOVFunction::getFilename ( ) const

Definition at line 353 of file GCOV.cpp.

References file, llvm::GCOVFile::filenames, and srcIdx.

Referenced by print().

◆ getName()

StringRef GCOVFunction::getName ( bool  demangle) const

◆ print()

void GCOVFunction::print ( raw_ostream OS) const

Definition at line 424 of file GCOV.cpp.

References llvm::Block, blocks, getFilename(), ident, Name, OS, and startLine.

Referenced by dump().

◆ propagateCounts()

void GCOVFunction::propagateCounts ( const GCOVBlock v,
GCOVArc pred 
)

Member Data Documentation

◆ arcs

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

Definition at line 269 of file GCOV.h.

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

◆ artificial

uint8_t llvm::GCOVFunction::artificial = 0

Definition at line 264 of file GCOV.h.

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

◆ blocks

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

◆ cfgChecksum

uint32_t llvm::GCOVFunction::cfgChecksum = 0

Definition at line 259 of file GCOV.h.

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

◆ demangled

SmallString<0> llvm::GCOVFunction::demangled
mutable

Definition at line 266 of file GCOV.h.

Referenced by getName().

◆ endColumn

uint32_t llvm::GCOVFunction::endColumn = 0

Definition at line 263 of file GCOV.h.

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

◆ endLine

uint32_t llvm::GCOVFunction::endLine = 0

Definition at line 262 of file GCOV.h.

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

◆ file

GCOVFile& llvm::GCOVFunction::file

Definition at line 256 of file GCOV.h.

Referenced by getExitBlock(), and getFilename().

◆ ident

uint32_t llvm::GCOVFunction::ident = 0

Definition at line 257 of file GCOV.h.

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

◆ linenoChecksum

uint32_t llvm::GCOVFunction::linenoChecksum

Definition at line 258 of file GCOV.h.

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

◆ Name

StringRef llvm::GCOVFunction::Name

Definition at line 265 of file GCOV.h.

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

◆ srcIdx

unsigned llvm::GCOVFunction::srcIdx

Definition at line 267 of file GCOV.h.

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

◆ startColumn

uint32_t llvm::GCOVFunction::startColumn = 0

Definition at line 261 of file GCOV.h.

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

◆ startLine

uint32_t llvm::GCOVFunction::startLine = 0

Definition at line 260 of file GCOV.h.

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

◆ treeArcs

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

Definition at line 269 of file GCOV.h.

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

◆ visited

DenseSet<const GCOVBlock *> llvm::GCOVFunction::visited

Definition at line 270 of file GCOV.h.

Referenced by propagateCounts().


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