LLVM  12.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::GCOVFile Class Reference

GCOVFile - Collects coverage information for one pair of coverage file (.gcno and .gcda). More...

#include "llvm/ProfileData/GCOV.h"

Collaboration diagram for llvm::GCOVFile:
Collaboration graph

Public Member Functions

 GCOVFile ()=default
bool readGCNO (GCOVBuffer &Buffer)
 readGCNO - Read GCNO buffer. More...
bool readGCDA (GCOVBuffer &Buffer)
 readGCDA - Read GCDA buffer. More...
GCOV::GCOVVersion getVersion () const
uint32_t getChecksum () const
void print (raw_ostream &OS) const
void dump () const
 dump - Dump GCOVFile content to dbgs() for debugging purposes. More...
void collectLineCounts (FileInfo &FI)
 collectLineCounts - Collect line counts. More...

Public Attributes

std::vector< std::string > filenames
StringMap< unsignedfilenameToIdx

Detailed Description

GCOVFile - Collects coverage information for one pair of coverage file (.gcno and .gcda).

Definition at line 183 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVFile()

llvm::GCOVFile::GCOVFile ( )

Member Function Documentation

◆ collectLineCounts()

void GCOVFile::collectLineCounts ( FileInfo fi)

collectLineCounts - Collect line counts.

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

Definition at line 251 of file GCOV.cpp.

References assert(), llvm::GCOVFunction::collectLineCounts(), llvm::sys::path::filename(), filenames, llvm::FileInfo::setProgramCount(), llvm::FileInfo::setRunCount(), llvm::FileInfo::sources, and llvm::GCOVFunction::srcIdx.

◆ dump()

LLVM_DUMP_METHOD void GCOVFile::dump ( ) const

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

Definition at line 246 of file GCOV.cpp.

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

◆ getChecksum()

uint32_t llvm::GCOVFile::getChecksum ( ) const

Definition at line 190 of file GCOV.h.

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

◆ getVersion()

GCOV::GCOVVersion llvm::GCOVFile::getVersion ( ) const

Definition at line 189 of file GCOV.h.

References llvm::IndexedInstrProf::Version.

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

◆ print()

void GCOVFile::print ( raw_ostream OS) const

Definition at line 239 of file GCOV.cpp.

References llvm::GCOVFunction::print().

Referenced by branchDiv(), dump(), llvm::GCOVFunction::dump(), and llvm::GCOVBlock::dump().

◆ readGCDA()

bool GCOVFile::readGCDA ( GCOVBuffer buf)

◆ readGCNO()

bool GCOVFile::readGCNO ( GCOVBuffer Buffer)

Member Data Documentation

◆ filenames

std::vector<std::string> llvm::GCOVFile::filenames

Definition at line 195 of file GCOV.h.

Referenced by collectLineCounts(), and readGCNO().

◆ filenameToIdx

StringMap<unsigned> llvm::GCOVFile::filenameToIdx

Definition at line 196 of file GCOV.h.

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

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