LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::GCOVBuffer Class Reference

GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific read operations. More...

#include "llvm/ProfileData/GCOV.h"

Collaboration diagram for llvm::GCOVBuffer:
Collaboration graph
[legend]

Public Member Functions

 GCOVBuffer (MemoryBuffer *B)
 
 ~GCOVBuffer ()
 
bool readGCNOFormat ()
 readGCNOFormat - Check GCNO signature is valid at the beginning of buffer. More...
 
bool readGCDAFormat ()
 readGCDAFormat - Check GCDA signature is valid at the beginning of buffer. More...
 
bool readGCOVVersion (GCOV::GCOVVersion &version)
 readGCOVVersion - Read GCOV version. More...
 
uint32_t getWord ()
 
StringRef getString ()
 
bool readInt (uint32_t &Val)
 
bool readInt64 (uint64_t &Val)
 
bool readString (StringRef &str)
 

Public Attributes

DataExtractor de {ArrayRef<uint8_t>{}, false, 0}
 
DataExtractor::Cursor cursor {0}
 

Detailed Description

GCOVBuffer - A wrapper around MemoryBuffer to provide GCOV specific read operations.

Definition at line 76 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVBuffer()

llvm::GCOVBuffer::GCOVBuffer ( MemoryBuffer B)
inline

Definition at line 78 of file GCOV.h.

◆ ~GCOVBuffer()

llvm::GCOVBuffer::~GCOVBuffer ( )
inline

Definition at line 79 of file GCOV.h.

References llvm::consumeError(), cursor, and llvm::DataExtractor::Cursor::takeError().

Member Function Documentation

◆ getString()

StringRef llvm::GCOVBuffer::getString ( )
inline

Definition at line 148 of file GCOV.h.

References cursor, de, llvm::DataExtractor::getBytes(), readInt(), and llvm::StringRef::split().

◆ getWord()

uint32_t llvm::GCOVBuffer::getWord ( )
inline

Definition at line 147 of file GCOV.h.

References cursor, de, and llvm::DataExtractor::getU32().

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

◆ readGCDAFormat()

bool llvm::GCOVBuffer::readGCDAFormat ( )
inline

readGCDAFormat - Check GCDA signature is valid at the beginning of buffer.

Definition at line 97 of file GCOV.h.

References de, llvm::MemoryBuffer::getBuffer(), and llvm::StringRef::substr().

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

◆ readGCNOFormat()

bool llvm::GCOVBuffer::readGCNOFormat ( )
inline

readGCNOFormat - Check GCNO signature is valid at the beginning of buffer.

Definition at line 82 of file GCOV.h.

References de, llvm::errs(), llvm::MemoryBuffer::getBuffer(), and llvm::StringRef::substr().

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

◆ readGCOVVersion()

bool llvm::GCOVBuffer::readGCOVVersion ( GCOV::GCOVVersion version)
inline

◆ readInt()

bool llvm::GCOVBuffer::readInt ( uint32_t Val)
inline

◆ readInt64()

bool llvm::GCOVBuffer::readInt64 ( uint64_t Val)
inline

Definition at line 165 of file GCOV.h.

References llvm::MipsISD::Hi, llvm::MipsISD::Lo, and readInt().

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

◆ readString()

bool llvm::GCOVBuffer::readString ( StringRef str)
inline

Member Data Documentation

◆ cursor

DataExtractor::Cursor llvm::GCOVBuffer::cursor {0}

◆ de

DataExtractor llvm::GCOVBuffer::de {ArrayRef<uint8_t>{}, false, 0}

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