LLVM 20.0.0git
|
GCOVFile - Collects coverage information for one pair of coverage file (.gcno and .gcda). More...
#include "llvm/ProfileData/GCOV.h"
Public Types | |
using | iterator = pointee_iterator< SmallVectorImpl< std::unique_ptr< GCOVFunction > >::const_iterator > |
Public Member Functions | |
GCOVFile ()=default | |
bool | readGCNO (GCOVBuffer &Buffer) |
readGCNO - Read GCNO buffer. | |
bool | readGCDA (GCOVBuffer &Buffer) |
readGCDA - Read GCDA buffer. | |
GCOV::GCOVVersion | getVersion () const |
void | print (raw_ostream &OS) const |
void | dump () const |
dump - Dump GCOVFile content to dbgs() for debugging purposes. | |
iterator | begin () const |
iterator | end () const |
Public Attributes | |
std::vector< std::string > | filenames |
StringMap< unsigned > | filenameToIdx |
bool | GCNOInitialized = false |
GCOV::GCOVVersion | version {} |
uint32_t | checksum = 0 |
StringRef | cwd |
SmallVector< std::unique_ptr< GCOVFunction >, 16 > | functions |
std::map< uint32_t, GCOVFunction * > | identToFunction |
uint32_t | runCount = 0 |
uint32_t | programCount = 0 |
GCOVFile - Collects coverage information for one pair of coverage file (.gcno and .gcda).
using llvm::GCOVFile::iterator = pointee_iterator< SmallVectorImpl<std::unique_ptr<GCOVFunction> >::const_iterator> |
|
default |
|
inline |
LLVM_DUMP_METHOD void GCOVFile::dump | ( | ) | const |
|
inline |
|
inline |
Definition at line 197 of file GCOV.h.
References version.
Referenced by llvm::GCOVFunction::getExitBlock().
void GCOVFile::print | ( | raw_ostream & | OS | ) | const |
bool GCOVFile::readGCDA | ( | GCOVBuffer & | buf | ) |
readGCDA - Read GCDA buffer.
It is required that readGCDA() can only be called after readGCNO().
Definition at line 210 of file GCOV.cpp.
References llvm::GCOVBlock::addSrcEdge(), llvm::GCOVFunction::arcs, assert(), block, llvm::GCOVFunction::blocks, llvm::GCOVFunction::blocksRange(), llvm::GCOVFunction::cfgChecksum, checksum, llvm::GCOVBuffer::cursor, llvm::GCOVBuffer::de, llvm::errs(), llvm::format(), GCNOInitialized, GCOV_ARC_ON_TREE, GCOV_TAG_COUNTER_ARCS, GCOV_TAG_FUNCTION, GCOV_TAG_OBJECT_SUMMARY, GCOV_TAG_PROGRAM_SUMMARY, llvm::GCOVBuffer::getWord(), identToFunction, llvm::GCOVFunction::linenoChecksum, llvm::GCOVFunction::Name, programCount, llvm::GCOVFunction::propagateCounts(), llvm::GCOVBuffer::readGCDAFormat(), llvm::GCOVBuffer::readGCOVVersion(), llvm::GCOVBuffer::readInt(), llvm::GCOVBuffer::readInt64(), runCount, sink(), llvm::DataExtractor::skip(), llvm::DataExtractor::Cursor::tell(), llvm::GCOVFunction::treeArcs, llvm::GCOV::V1200, llvm::GCOV::V407, llvm::GCOV::V408, and version.
bool GCOVFile::readGCNO | ( | GCOVBuffer & | Buffer | ) |
readGCNO - Read GCNO buffer.
Definition at line 102 of file GCOV.cpp.
References llvm::GCOVBlock::addDstEdge(), llvm::GCOVBlock::addSrcEdge(), llvm::GCOVFunction::arcs, llvm::GCOVFunction::artificial, llvm::Block, llvm::GCOVFunction::blocks, llvm::GCOVFunction::cfgChecksum, checksum, llvm::GCOVBuffer::cursor, cwd, llvm::GCOVBuffer::de, llvm::StringRef::empty(), llvm::GCOVFunction::endColumn, llvm::GCOVFunction::endLine, llvm::errs(), functions, GCNOInitialized, GCOV_TAG_ARCS, GCOV_TAG_BLOCKS, GCOV_TAG_FUNCTION, GCOV_TAG_LINES, llvm::GCOVBuffer::getWord(), llvm::GCOVFunction::ident, identToFunction, llvm::GCOVFunction::linenoChecksum, llvm::GCOVFunction::Name, llvm::GCOVBuffer::readGCNOFormat(), llvm::GCOVBuffer::readGCOVVersion(), llvm::GCOVBuffer::readInt(), llvm::GCOVBuffer::readString(), llvm::DataExtractor::skip(), llvm::GCOVFunction::srcIdx, llvm::GCOVFunction::startColumn, llvm::GCOVFunction::startLine, llvm::DataExtractor::Cursor::tell(), llvm::GCOVFunction::treeArcs, llvm::GCOV::V1200, llvm::GCOV::V407, llvm::GCOV::V800, llvm::GCOV::V900, and version.
uint32_t llvm::GCOVFile::checksum = 0 |
Definition at line 207 of file GCOV.h.
Referenced by readGCDA(), and readGCNO().
StringRef llvm::GCOVFile::cwd |
Definition at line 208 of file GCOV.h.
Referenced by readGCNO().
std::vector<std::string> llvm::GCOVFile::filenames |
Definition at line 201 of file GCOV.h.
Referenced by llvm::GCOVFunction::getFilename().
SmallVector<std::unique_ptr<GCOVFunction>, 16> llvm::GCOVFile::functions |
Definition at line 209 of file GCOV.h.
Referenced by begin(), end(), and readGCNO().
bool llvm::GCOVFile::GCNOInitialized = false |
Definition at line 205 of file GCOV.h.
Referenced by readGCDA(), and readGCNO().
std::map<uint32_t, GCOVFunction *> llvm::GCOVFile::identToFunction |
Definition at line 210 of file GCOV.h.
Referenced by readGCDA(), and readGCNO().
uint32_t llvm::GCOVFile::programCount = 0 |
Definition at line 212 of file GCOV.h.
Referenced by readGCDA().
uint32_t llvm::GCOVFile::runCount = 0 |
Definition at line 211 of file GCOV.h.
Referenced by readGCDA().
GCOV::GCOVVersion llvm::GCOVFile::version {} |
Definition at line 206 of file GCOV.h.
Referenced by getVersion(), readGCDA(), and readGCNO().