LLVM 22.0.0git
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 74 of file GCOV.h.

Constructor & Destructor Documentation

◆ GCOVBuffer()

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

Definition at line 76 of file GCOV.h.

References B().

◆ ~GCOVBuffer()

llvm::GCOVBuffer::~GCOVBuffer ( )
inline

Definition at line 77 of file GCOV.h.

References llvm::consumeError(), and cursor.

Member Function Documentation

◆ getString()

StringRef llvm::GCOVBuffer::getString ( )
inline

Definition at line 146 of file GCOV.h.

References cursor, de, and readInt().

◆ getWord()

uint32_t llvm::GCOVBuffer::getWord ( )
inline

Definition at line 145 of file GCOV.h.

References cursor, and de.

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 95 of file GCOV.h.

References de, 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 80 of file GCOV.h.

References de, llvm::errs(), 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

Definition at line 153 of file GCOV.h.

References cursor, de, and llvm::errs().

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

◆ readInt64()

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

Definition at line 163 of file GCOV.h.

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

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

◆ readString()

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

Definition at line 171 of file GCOV.h.

References cursor, de, readInt(), and llvm::GCOV::V1200.

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

Member Data Documentation

◆ cursor

◆ de


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