LLVM 20.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"

Public Member Functions

 GCOVBuffer (MemoryBuffer *B)
 
 ~GCOVBuffer ()
 
bool readGCNOFormat ()
 readGCNOFormat - Check GCNO signature is valid at the beginning of buffer.
 
bool readGCDAFormat ()
 readGCDAFormat - Check GCDA signature is valid at the beginning of buffer.
 
bool readGCOVVersion (GCOV::GCOVVersion &version)
 readGCOVVersion - Read GCOV version.
 
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 73 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVBuffer()

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

Definition at line 75 of file GCOV.h.

◆ ~GCOVBuffer()

llvm::GCOVBuffer::~GCOVBuffer ( )
inline

Definition at line 76 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 145 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 144 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 94 of file GCOV.h.

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

Referenced by llvm::GCOVFile::readGCDA(), and llvm::sampleprof::SampleProfileReaderGCC::readHeader().

◆ readGCNOFormat()

bool llvm::GCOVBuffer::readGCNOFormat ( )
inline

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

Definition at line 79 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

◆ 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: