LLVM 23.0.0git
llvm::pdb::TpiStream Class Reference

#include "llvm/DebugInfo/PDB/Native/TpiStream.h"

Public Member Functions

LLVM_ABI TpiStream (PDBFile &File, std::unique_ptr< msf::MappedBlockStream > Stream)
LLVM_ABI ~TpiStream ()
LLVM_ABI Error reload ()
LLVM_ABI PdbRaw_TpiVer getTpiVersion () const
LLVM_ABI uint32_t TypeIndexBegin () const
LLVM_ABI uint32_t TypeIndexEnd () const
LLVM_ABI uint32_t getNumTypeRecords () const
LLVM_ABI uint16_t getTypeHashStreamIndex () const
LLVM_ABI uint16_t getTypeHashStreamAuxIndex () const
LLVM_ABI uint32_t getHashKeySize () const
LLVM_ABI uint32_t getNumHashBuckets () const
LLVM_ABI FixedStreamArray< support::ulittle32_tgetHashValues () const
LLVM_ABI FixedStreamArray< codeview::TypeIndexOffsetgetTypeIndexOffsets () const
LLVM_ABI HashTable< support::ulittle32_t > & getHashAdjusters ()
LLVM_ABI codeview::CVTypeRange types (bool *HadError) const
const codeview::CVTypeArraytypeArray () const
codeview::LazyRandomTypeCollectiontypeCollection ()
LLVM_ABI Expected< codeview::TypeIndexfindFullDeclForForwardRef (codeview::TypeIndex ForwardRefTI) const
LLVM_ABI std::vector< codeview::TypeIndexfindRecordsByName (StringRef Name) const
LLVM_ABI codeview::CVType getType (codeview::TypeIndex Index)
 Get a type by its index.
LLVM_ABI codeview::CVType getTypeOrEmpty (codeview::TypeIndex Index)
 The same as getType() except that the return value is defined (empty/invalid) if Index doesn't exist.
LLVM_ABI std::optional< codeview::CVTypetryGetType (codeview::TypeIndex Index)
 Get the type at Index if it exists or std::nullopt otherwise.
LLVM_ABI Expected< codeview::CVTypegetTypeOrError (codeview::TypeIndex Index)
 Get the type at Index if it exists or an error about the failure.
LLVM_ABI BinarySubstreamRef getTypeRecordsSubstream () const
LLVM_ABI Error commit ()
LLVM_ABI void buildHashMap ()
LLVM_ABI bool supportsTypeLookup () const

Friends

class TpiStreamBuilder

Detailed Description

Definition at line 35 of file TpiStream.h.

Constructor & Destructor Documentation

◆ TpiStream()

TpiStream::TpiStream ( PDBFile & File,
std::unique_ptr< msf::MappedBlockStream > Stream )

Definition at line 35 of file TpiStream.cpp.

References llvm::move().

Referenced by findFullDeclForForwardRef(), and findRecordsByName().

◆ ~TpiStream()

TpiStream::~TpiStream ( )
default

References LLVM_ABI.

Member Function Documentation

◆ buildHashMap()

void TpiStream::buildHashMap ( )

◆ commit()

Error TpiStream::commit ( )

Definition at line 259 of file TpiStream.cpp.

References llvm::Error::success().

◆ findFullDeclForForwardRef()

◆ findRecordsByName()

std::vector< TypeIndex > TpiStream::findRecordsByName ( StringRef Name) const

◆ getHashAdjusters()

HashTable< support::ulittle32_t > & TpiStream::getHashAdjusters ( )

Definition at line 251 of file TpiStream.cpp.

◆ getHashKeySize()

uint32_t TpiStream::getHashKeySize ( ) const

Definition at line 141 of file TpiStream.cpp.

◆ getHashValues()

FixedStreamArray< support::ulittle32_t > TpiStream::getHashValues ( ) const

Definition at line 243 of file TpiStream.cpp.

◆ getNumHashBuckets()

uint32_t TpiStream::getNumHashBuckets ( ) const

Definition at line 140 of file TpiStream.cpp.

◆ getNumTypeRecords()

uint32_t TpiStream::getNumTypeRecords ( ) const

Definition at line 128 of file TpiStream.cpp.

References TypeIndexBegin(), and TypeIndexEnd().

Referenced by reload().

◆ getTpiVersion()

PdbRaw_TpiVer TpiStream::getTpiVersion ( ) const

Definition at line 119 of file TpiStream.cpp.

◆ getType()

codeview::CVType TpiStream::getType ( codeview::TypeIndex Index)

Get a type by its index.

Index must be a valid type index. Otherwise, this method asserts in Debug mode.

Definition at line 220 of file TpiStream.cpp.

References assert().

◆ getTypeHashStreamAuxIndex()

uint16_t TpiStream::getTypeHashStreamAuxIndex ( ) const

Definition at line 136 of file TpiStream.cpp.

◆ getTypeHashStreamIndex()

uint16_t TpiStream::getTypeHashStreamIndex ( ) const

Definition at line 132 of file TpiStream.cpp.

◆ getTypeIndexOffsets()

FixedStreamArray< TypeIndexOffset > TpiStream::getTypeIndexOffsets ( ) const

Definition at line 247 of file TpiStream.cpp.

Referenced by reload().

◆ getTypeOrEmpty()

codeview::CVType TpiStream::getTypeOrEmpty ( codeview::TypeIndex Index)

The same as getType() except that the return value is defined (empty/invalid) if Index doesn't exist.

Use codeview::CVType::valid() to check the return value.

Definition at line 225 of file TpiStream.cpp.

◆ getTypeOrError()

Expected< codeview::CVType > TpiStream::getTypeOrError ( codeview::TypeIndex Index)

Get the type at Index if it exists or an error about the failure.

Definition at line 235 of file TpiStream.cpp.

◆ getTypeRecordsSubstream()

BinarySubstreamRef TpiStream::getTypeRecordsSubstream ( ) const

Definition at line 239 of file TpiStream.cpp.

◆ reload()

◆ supportsTypeLookup()

bool TpiStream::supportsTypeLookup ( ) const

Definition at line 176 of file TpiStream.cpp.

Referenced by findFullDeclForForwardRef(), and findRecordsByName().

◆ tryGetType()

std::optional< codeview::CVType > TpiStream::tryGetType ( codeview::TypeIndex Index)

Get the type at Index if it exists or std::nullopt otherwise.

Definition at line 230 of file TpiStream.cpp.

◆ typeArray()

const codeview::CVTypeArray & llvm::pdb::TpiStream::typeArray ( ) const
inline

Definition at line 60 of file TpiStream.h.

◆ typeCollection()

codeview::LazyRandomTypeCollection & llvm::pdb::TpiStream::typeCollection ( )
inline

Definition at line 62 of file TpiStream.h.

◆ TypeIndexBegin()

uint32_t TpiStream::TypeIndexBegin ( ) const

Definition at line 124 of file TpiStream.cpp.

Referenced by getNumTypeRecords().

◆ TypeIndexEnd()

uint32_t TpiStream::TypeIndexEnd ( ) const

Definition at line 126 of file TpiStream.cpp.

Referenced by getNumTypeRecords().

◆ types()

CVTypeRange TpiStream::types ( bool * HadError) const

Definition at line 255 of file TpiStream.cpp.

References llvm::make_range().

◆ TpiStreamBuilder

friend class TpiStreamBuilder
friend

Definition at line 36 of file TpiStream.h.

References LLVM_ABI, and TpiStreamBuilder.

Referenced by TpiStreamBuilder.


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