LLVM  5.0.0
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:
[legend]
Collaboration diagram for llvm::codeview::TypeSerializer:
[legend]

Public Member Functions

 TypeSerializer (BumpPtrAllocator &Storage, bool Hash=true)
 
 ~TypeSerializer () override
 
void reset ()
 
BumpPtrAllocator & getAllocator ()
 
ArrayRef< ArrayRef< uint8_t > > records () const
 
TypeIndex insertRecordBytes (ArrayRef< uint8_t > &Record)
 
TypeIndex insertRecord (const RemappedType &Record)
 
Expected< TypeIndex > visitTypeEndGetIndex (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 ( BumpPtrAllocator &  Storage,
bool  Hash = true 
)
explicit

Definition at line 178 of file TypeSerializer.cpp.

TypeSerializer::~TypeSerializer ( )
overridedefault

Member Function Documentation

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

Definition at line 95 of file TypeSerializer.h.

TypeIndex TypeSerializer::insertRecord ( const RemappedType &  Record)
TypeIndex TypeSerializer::insertRecordBytes ( ArrayRef< uint8_t > &  Record)
ArrayRef< ArrayRef< uint8_t > > TypeSerializer::records ( ) const
void TypeSerializer::reset ( )
Error TypeSerializer::visitMemberBegin ( CVMemberRecord &  Record)
overridevirtual
Error TypeSerializer::visitMemberEnd ( CVMemberRecord &  Record)
overridevirtual
Error TypeSerializer::visitTypeBegin ( CVType &  Record)
overridevirtual

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(), and llvm::codeview::TypeTableBuilder::writeKnownType().

Error TypeSerializer::visitTypeEnd ( CVType &  Record)
overridevirtual
Expected< TypeIndex > TypeSerializer::visitTypeEndGetIndex ( CVType &  Record)

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