LLVM  6.0.0svn
Classes | Public Member Functions | List of all members
llvm::codeview::TypeSerializer Class Reference

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

Inheritance diagram for llvm::codeview::TypeSerializer:
Inheritance graph
Collaboration diagram for llvm::codeview::TypeSerializer:
Collaboration graph

Public Member Functions

 TypeSerializer (BumpPtrAllocator &Storage, bool Hash=true)
 ~TypeSerializer () override
void reset ()
BumpPtrAllocatorgetAllocator ()
ArrayRef< ArrayRef< uint8_t > > records () const
TypeIndex insertRecordBytes (ArrayRef< uint8_t > &Record)
TypeIndex insertRecord (const RemappedType &Record)
Expected< TypeIndexvisitTypeEndGetIndex (CVType &Record)
Error visitTypeBegin (CVType &Record) override
 Paired begin/end actions for all types. More...
Error visitTypeEnd (CVType &Record) override
Error visitMemberBegin (CVMemberRecord &Record) override
Error visitMemberEnd (CVMemberRecord &Record) override
- Public Member Functions inherited from llvm::codeview::TypeVisitorCallbacks
virtual ~TypeVisitorCallbacks ()=default
virtual Error visitUnknownType (CVType &Record)
 Action to take on unknown types. By default, they are ignored. More...
virtual Error visitTypeBegin (CVType &Record, TypeIndex Index)
virtual Error visitUnknownMember (CVMemberRecord &Record)

Detailed Description

Definition at line 36 of file TypeSerializer.h.

Constructor & Destructor Documentation

◆ TypeSerializer()

TypeSerializer::TypeSerializer ( BumpPtrAllocator Storage,
bool  Hash = true 

Definition at line 178 of file TypeSerializer.cpp.

References ~TypeSerializer().

◆ ~TypeSerializer()

TypeSerializer::~TypeSerializer ( )

Referenced by TypeSerializer().

Member Function Documentation

◆ getAllocator()

BumpPtrAllocator& llvm::codeview::TypeSerializer::getAllocator ( )

◆ insertRecord()

TypeIndex TypeSerializer::insertRecord ( const RemappedType Record)

◆ insertRecordBytes()

TypeIndex TypeSerializer::insertRecordBytes ( ArrayRef< uint8_t > &  Record)

◆ records()

ArrayRef< ArrayRef< uint8_t > > TypeSerializer::records ( ) const

◆ reset()

void TypeSerializer::reset ( )

◆ visitMemberBegin()

Error TypeSerializer::visitMemberBegin ( CVMemberRecord Record)

◆ visitMemberEnd()

Error TypeSerializer::visitMemberEnd ( CVMemberRecord Record)

◆ visitTypeBegin()

Error TypeSerializer::visitTypeBegin ( CVType Record)

Paired begin/end actions for all types.

Receives all record data, including the fixed-length record prefix. visitTypeBegin() should return the type of the Record, or an error if it cannot be determined. Exactly one of the two visitTypeBegin methods will be called, depending on whether records are being visited sequentially or randomly. An implementation should be prepared to handle both (or assert if it can't handle random access visitation).

Reimplemented from llvm::codeview::TypeVisitorCallbacks.

Definition at line 253 of file TypeSerializer.cpp.

References assert(), llvm::codeview::EC, llvm::BinaryStreamWriter::getOffset(), llvm::Optional< T >::hasValue(), llvm::codeview::CVRecord< Kind >::kind(), llvm::Error::success(), and llvm::codeview::TypeRecordMapping::visitTypeBegin().

Referenced by llvm::codeview::FieldListRecordBuilder::begin(), getAllocator(), and llvm::codeview::TypeTableBuilder::writeKnownType().

◆ visitTypeEnd()

Error TypeSerializer::visitTypeEnd ( CVType Record)

◆ visitTypeEndGetIndex()

Expected< TypeIndex > TypeSerializer::visitTypeEndGetIndex ( CVType Record)

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