LLVM 22.0.0git
llvm::codeview::CodeViewRecordIO Class Reference

#include "llvm/DebugInfo/CodeView/CodeViewRecordIO.h"

Public Member Functions

 CodeViewRecordIO (BinaryStreamReader &Reader)
 CodeViewRecordIO (BinaryStreamWriter &Writer)
 CodeViewRecordIO (CodeViewRecordStreamer &Streamer)
LLVM_ABI Error beginRecord (std::optional< uint32_t > MaxLength)
LLVM_ABI Error endRecord ()
LLVM_ABI Error mapInteger (TypeIndex &TypeInd, const Twine &Comment="")
bool isStreaming () const
bool isReading () const
bool isWriting () const
LLVM_ABI uint32_t maxFieldLength () const
template<typename T>
Error mapObject (T &Value)
template<typename T>
Error mapInteger (T &Value, const Twine &Comment="")
template<typename T>
Error mapEnum (T &Value, const Twine &Comment="")
LLVM_ABI Error mapEncodedInteger (int64_t &Value, const Twine &Comment="")
LLVM_ABI Error mapEncodedInteger (uint64_t &Value, const Twine &Comment="")
LLVM_ABI Error mapEncodedInteger (APSInt &Value, const Twine &Comment="")
LLVM_ABI Error mapStringZ (StringRef &Value, const Twine &Comment="")
LLVM_ABI Error mapGuid (GUID &Guid, const Twine &Comment="")
LLVM_ABI Error mapStringZVectorZ (std::vector< StringRef > &Value, const Twine &Comment="")
template<typename SizeType, typename T, typename ElementMapper>
Error mapVectorN (T &Items, const ElementMapper &Mapper, const Twine &Comment="")
template<typename T, typename ElementMapper>
Error mapVectorTail (T &Items, const ElementMapper &Mapper, const Twine &Comment="")
LLVM_ABI Error mapByteVectorTail (ArrayRef< uint8_t > &Bytes, const Twine &Comment="")
LLVM_ABI Error mapByteVectorTail (std::vector< uint8_t > &Bytes, const Twine &Comment="")
LLVM_ABI Error padToAlignment (uint32_t Align)
LLVM_ABI Error skipPadding ()
uint64_t getStreamedLen ()
void emitRawComment (const Twine &T)

Detailed Description

Definition at line 44 of file CodeViewRecordIO.h.

Constructor & Destructor Documentation

◆ CodeViewRecordIO() [1/3]

llvm::codeview::CodeViewRecordIO::CodeViewRecordIO ( BinaryStreamReader & Reader)
inlineexplicit

Definition at line 56 of file CodeViewRecordIO.h.

◆ CodeViewRecordIO() [2/3]

llvm::codeview::CodeViewRecordIO::CodeViewRecordIO ( BinaryStreamWriter & Writer)
inlineexplicit

Definition at line 59 of file CodeViewRecordIO.h.

◆ CodeViewRecordIO() [3/3]

llvm::codeview::CodeViewRecordIO::CodeViewRecordIO ( CodeViewRecordStreamer & Streamer)
inlineexplicit

Definition at line 62 of file CodeViewRecordIO.h.

Member Function Documentation

◆ beginRecord()

Error CodeViewRecordIO::beginRecord ( std::optional< uint32_t > MaxLength)

Definition at line 21 of file CodeViewRecordIO.cpp.

References llvm::Error::success().

◆ emitRawComment()

void llvm::codeview::CodeViewRecordIO::emitRawComment ( const Twine & T)
inline

Definition at line 215 of file CodeViewRecordIO.h.

References isStreaming(), and T.

◆ endRecord()

Error CodeViewRecordIO::endRecord ( )

Definition at line 29 of file CodeViewRecordIO.cpp.

References assert(), getStreamedLen(), isStreaming(), and llvm::Error::success().

◆ getStreamedLen()

uint64_t llvm::codeview::CodeViewRecordIO::getStreamedLen ( )
inline

Definition at line 209 of file CodeViewRecordIO.h.

References isStreaming().

Referenced by endRecord().

◆ isReading()

bool llvm::codeview::CodeViewRecordIO::isReading ( ) const
inline

Definition at line 73 of file CodeViewRecordIO.h.

Referenced by mapEnum(), mapStringZVectorZ(), and padToAlignment().

◆ isStreaming()

◆ isWriting()

◆ mapByteVectorTail() [1/2]

Error CodeViewRecordIO::mapByteVectorTail ( ArrayRef< uint8_t > & Bytes,
const Twine & Comment = "" )

◆ mapByteVectorTail() [2/2]

Error CodeViewRecordIO::mapByteVectorTail ( std::vector< uint8_t > & Bytes,
const Twine & Comment = "" )

◆ mapEncodedInteger() [1/3]

Error CodeViewRecordIO::mapEncodedInteger ( APSInt & Value,
const Twine & Comment = "" )

◆ mapEncodedInteger() [2/3]

Error CodeViewRecordIO::mapEncodedInteger ( int64_t & Value,
const Twine & Comment = "" )

◆ mapEncodedInteger() [3/3]

Error CodeViewRecordIO::mapEncodedInteger ( uint64_t & Value,
const Twine & Comment = "" )

◆ mapEnum()

template<typename T>
Error llvm::codeview::CodeViewRecordIO::mapEnum ( T & Value,
const Twine & Comment = "" )
inline

◆ mapGuid()

◆ mapInteger() [1/2]

template<typename T>
Error llvm::codeview::CodeViewRecordIO::mapInteger ( T & Value,
const Twine & Comment = "" )
inline

Definition at line 101 of file CodeViewRecordIO.h.

References isStreaming(), isWriting(), llvm::Error::success(), and T.

◆ mapInteger() [2/2]

◆ mapObject()

template<typename T>
Error llvm::codeview::CodeViewRecordIO::mapObject ( T & Value)
inline

◆ mapStringZ()

Error CodeViewRecordIO::mapStringZ ( StringRef & Value,
const Twine & Comment = "" )

◆ mapStringZVectorZ()

Error CodeViewRecordIO::mapStringZVectorZ ( std::vector< StringRef > & Value,
const Twine & Comment = "" )

◆ mapVectorN()

template<typename SizeType, typename T, typename ElementMapper>
Error llvm::codeview::CodeViewRecordIO::mapVectorN ( T & Items,
const ElementMapper & Mapper,
const Twine & Comment = "" )
inline

Definition at line 144 of file CodeViewRecordIO.h.

References llvm::codeview::EC, I, isStreaming(), isWriting(), Size, llvm::Error::success(), T, and X.

◆ mapVectorTail()

template<typename T, typename ElementMapper>
Error llvm::codeview::CodeViewRecordIO::mapVectorTail ( T & Items,
const ElementMapper & Mapper,
const Twine & Comment = "" )
inline

◆ maxFieldLength()

uint32_t CodeViewRecordIO::maxFieldLength ( ) const

◆ padToAlignment()

Error CodeViewRecordIO::padToAlignment ( uint32_t Align)

Definition at line 82 of file CodeViewRecordIO.cpp.

References isReading().

◆ skipPadding()

Error CodeViewRecordIO::skipPadding ( )

Definition at line 88 of file CodeViewRecordIO.cpp.

References assert(), isWriting(), and llvm::Error::success().


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