LLVM  5.0.0
Classes | Public Types | Public Member Functions | List of all members
llvm::GCOVBlock Class Reference

GCOVBlock - Collects block information. More...

#include "llvm/Support/GCOV.h"

Public Types

using EdgeIterator = SmallVectorImpl< GCOVEdge * >::const_iterator
 

Public Member Functions

 GCOVBlock (GCOVFunction &P, uint32_t N)
 
 ~GCOVBlock ()
 ~GCOVBlock - Delete GCOVBlock and its content. More...
 
const GCOVFunction & getParent () const
 
void addLine (uint32_t N)
 
uint32_t getLastLine () const
 
void addCount (size_t DstEdgeNo, uint64_t N)
 addCount - Add to block counter while storing the edge count. More...
 
uint64_t getCount () const
 
void addSrcEdge (GCOVEdge *Edge)
 
void addDstEdge (GCOVEdge *Edge)
 
size_t getNumSrcEdges () const
 
size_t getNumDstEdges () const
 
void sortDstEdges ()
 sortDstEdges - Sort destination edges by block number, nop if already sorted. More...
 
EdgeIterator src_begin () const
 
EdgeIterator src_end () const
 
iterator_range< EdgeIterator > srcs () const
 
EdgeIterator dst_begin () const
 
EdgeIterator dst_end () const
 
iterator_range< EdgeIterator > dsts () const
 
void print (raw_ostream &OS) const
 
void dump () const
 dump - Dump GCOVBlock content to dbgs() for debugging purposes. More...
 
void collectLineCounts (FileInfo &FI)
 collectLineCounts - Collect line counts. More...
 

Detailed Description

GCOVBlock - Collects block information.

Definition at line 309 of file GCOV.h.

Member Typedef Documentation

Definition at line 324 of file GCOV.h.

Constructor & Destructor Documentation

llvm::GCOVBlock::GCOVBlock ( GCOVFunction &  P,
uint32_t  N 
)
inline

Definition at line 326 of file GCOV.h.

GCOVBlock::~GCOVBlock ( )

~GCOVBlock - Delete GCOVBlock and its content.

Definition at line 383 of file GCOV.cpp.

References llvm::SmallVectorImpl< T >::clear().

Member Function Documentation

void GCOVBlock::addCount ( size_t  DstEdgeNo,
uint64_t  N 
)

addCount - Add to block counter while storing the edge count.

If the destination has no outgoing edges, also update that block's count too.

Definition at line 391 of file GCOV.cpp.

References assert(), and N.

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

void llvm::GCOVBlock::addDstEdge ( GCOVEdge *  Edge)
inline

Definition at line 340 of file GCOV.h.

References assert(), llvm::GCOVEdge::Dst, and llvm::GCOVEdge::Src.

void llvm::GCOVBlock::addLine ( uint32_t  N)
inline
void llvm::GCOVBlock::addSrcEdge ( GCOVEdge *  Edge)
inline

Definition at line 335 of file GCOV.h.

References assert(), and llvm::GCOVEdge::Dst.

void GCOVBlock::collectLineCounts ( FileInfo &  FI)

collectLineCounts - Collect line counts.

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

Definition at line 410 of file GCOV.cpp.

References llvm::FileInfo::addBlockLine(), llvm::GCOVFunction::getFilename(), and N.

EdgeIterator llvm::GCOVBlock::dst_begin ( ) const
inline

Definition at line 358 of file GCOV.h.

Referenced by dsts().

EdgeIterator llvm::GCOVBlock::dst_end ( ) const
inline

Definition at line 359 of file GCOV.h.

Referenced by dsts().

iterator_range<EdgeIterator> llvm::GCOVBlock::dsts ( ) const
inline

Definition at line 360 of file GCOV.h.

References dst_begin(), dst_end(), and llvm::make_range().

LLVM_DUMP_METHOD void GCOVBlock::dump ( ) const

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

Definition at line 439 of file GCOV.cpp.

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

uint64_t llvm::GCOVBlock::getCount ( ) const
inline

Definition at line 333 of file GCOV.h.

uint32_t llvm::GCOVBlock::getLastLine ( ) const
inline

Definition at line 331 of file GCOV.h.

References llvm::SmallVectorTemplateCommon< T, typename >::back().

size_t llvm::GCOVBlock::getNumDstEdges ( ) const
inline

Definition at line 349 of file GCOV.h.

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

size_t llvm::GCOVBlock::getNumSrcEdges ( ) const
inline

Definition at line 348 of file GCOV.h.

const GCOVFunction& llvm::GCOVBlock::getParent ( ) const
inline

Definition at line 329 of file GCOV.h.

void GCOVBlock::print ( raw_ostream &  OS) const

Definition at line 415 of file GCOV.cpp.

References llvm::SmallVectorBase::empty(), and N.

Referenced by dump().

void GCOVBlock::sortDstEdges ( )

sortDstEdges - Sort destination edges by block number, nop if already sorted.

This is required for printing branch info in the correct order.

Definition at line 401 of file GCOV.cpp.

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

EdgeIterator llvm::GCOVBlock::src_begin ( ) const
inline

Definition at line 352 of file GCOV.h.

Referenced by srcs().

EdgeIterator llvm::GCOVBlock::src_end ( ) const
inline

Definition at line 353 of file GCOV.h.

Referenced by srcs().

iterator_range<EdgeIterator> llvm::GCOVBlock::srcs ( ) const
inline

Definition at line 354 of file GCOV.h.

References llvm::make_range(), src_begin(), and src_end().


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