LLVM 22.0.0git
llvm::GCOVFunction Class Reference

GCOVFunction - Collects function information. More...

#include "llvm/ProfileData/GCOV.h"

Public Types

using BlockIterator

Public Member Functions

 GCOVFunction (GCOVFile &file)
LLVM_ABI StringRef getName (bool demangle) const
LLVM_ABI StringRef getFilename () const
LLVM_ABI uint64_t getEntryCount () const
 getEntryCount - Get the number of times the function was called by retrieving the entry block's count.
LLVM_ABI GCOVBlockgetExitBlock () const
iterator_range< BlockIteratorblocksRange () const
LLVM_ABI void propagateCounts (const GCOVBlock &v, GCOVArc *pred)
LLVM_ABI void print (raw_ostream &OS) const
LLVM_ABI 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 237 of file GCOV.h.

Member Typedef Documentation

◆ BlockIterator

Initial value:
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
An iterator type that allows iterating over the pointees via some other iterator.
Definition iterator.h:324

Definition at line 239 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVFunction()

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

Definition at line 242 of file GCOV.h.

References file.

Member Function Documentation

◆ blocksRange()

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

Definition at line 249 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(), LLVM_DUMP_METHOD, 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, and llvm::GCOV::V408.

◆ getFilename()

StringRef GCOVFunction::getFilename ( ) const

Definition at line 353 of file GCOV.cpp.

References file, and srcIdx.

Referenced by print().

◆ getName()

StringRef GCOVFunction::getName ( bool demangle) const

Definition at line 335 of file GCOV.cpp.

References llvm::demangle(), demangled, llvm::itaniumDemangle(), and Name.

◆ print()

void GCOVFunction::print ( raw_ostream & OS) const

Definition at line 424 of file GCOV.cpp.

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

Referenced by dump().

◆ propagateCounts()

Member Data Documentation

◆ arcs

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

Definition at line 270 of file GCOV.h.

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

◆ artificial

uint8_t llvm::GCOVFunction::artificial = 0

Definition at line 265 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 260 of file GCOV.h.

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

◆ demangled

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

Definition at line 267 of file GCOV.h.

Referenced by getName().

◆ endColumn

uint32_t llvm::GCOVFunction::endColumn = 0

Definition at line 264 of file GCOV.h.

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

◆ endLine

uint32_t llvm::GCOVFunction::endLine = 0

Definition at line 263 of file GCOV.h.

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

◆ file

GCOVFile& llvm::GCOVFunction::file

Definition at line 257 of file GCOV.h.

Referenced by GCOVFunction(), getExitBlock(), and getFilename().

◆ ident

uint32_t llvm::GCOVFunction::ident = 0

Definition at line 258 of file GCOV.h.

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

◆ linenoChecksum

uint32_t llvm::GCOVFunction::linenoChecksum

Definition at line 259 of file GCOV.h.

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

◆ Name

StringRef llvm::GCOVFunction::Name

Definition at line 266 of file GCOV.h.

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

◆ srcIdx

unsigned llvm::GCOVFunction::srcIdx

Definition at line 268 of file GCOV.h.

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

◆ startColumn

uint32_t llvm::GCOVFunction::startColumn = 0

Definition at line 262 of file GCOV.h.

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

◆ startLine

uint32_t llvm::GCOVFunction::startLine = 0

Definition at line 261 of file GCOV.h.

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

◆ treeArcs

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

Definition at line 270 of file GCOV.h.

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

◆ visited

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

Definition at line 271 of file GCOV.h.

Referenced by propagateCounts().


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