LLDB  mainline
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::repro::Serializer Class Reference

Serializes functions, their arguments and their return type to a stream. More...

#include <ReproducerInstrumentation.h>

Collaboration diagram for lldb_private::repro::Serializer:
Collaboration graph
[legend]

Public Member Functions

 Serializer (llvm::raw_ostream &stream=llvm::outs())
 
template<typename Head , typename... Tail>
void SerializeAll (const Head &head, const Tail &... tail)
 Recursively serialize all the given arguments. More...
 
void SerializeAll ()
 

Private Member Functions

template<typename T >
void Serialize (T *t)
 Serialize pointers. More...
 
template<typename T >
void Serialize (T &t)
 Serialize references. More...
 
void Serialize (const void *v)
 
void Serialize (void *v)
 
void Serialize (const char *t)
 
void Serialize (const char **t)
 

Private Attributes

llvm::raw_ostream & m_stream
 Serialization stream. More...
 
ObjectToIndex m_tracker
 Mapping of objects to indices. More...
 

Detailed Description

Serializes functions, their arguments and their return type to a stream.

Definition at line 584 of file ReproducerInstrumentation.h.

Constructor & Destructor Documentation

◆ Serializer()

lldb_private::repro::Serializer::Serializer ( llvm::raw_ostream &  stream = llvm::outs())
inline

Definition at line 586 of file ReproducerInstrumentation.h.

Member Function Documentation

◆ Serialize() [1/6]

template<typename T >
void lldb_private::repro::Serializer::Serialize ( T *  t)
inlineprivate

Serialize pointers.

We need to differentiate between pointers to fundamental types (in which case we serialize its value) and pointer to objects (in which case we serialize their index).

Definition at line 601 of file ReproducerInstrumentation.h.

References stringify_args().

◆ Serialize() [2/6]

template<typename T >
void lldb_private::repro::Serializer::Serialize ( T &  t)
inlineprivate

Serialize references.

We need to differentiate between references to fundamental types (in which case we serialize its value) and references to objects (in which case we serialize their index).

Definition at line 617 of file ReproducerInstrumentation.h.

References stringify_args().

◆ Serialize() [3/6]

void lldb_private::repro::Serializer::Serialize ( const void *  v)
inlineprivate

Definition at line 630 of file ReproducerInstrumentation.h.

◆ Serialize() [4/6]

void lldb_private::repro::Serializer::Serialize ( void *  v)
inlineprivate

Definition at line 634 of file ReproducerInstrumentation.h.

◆ Serialize() [5/6]

void lldb_private::repro::Serializer::Serialize ( const char *  t)
inlineprivate

Definition at line 638 of file ReproducerInstrumentation.h.

References stringify_args(), and arm64_dwarf::x0.

◆ Serialize() [6/6]

void lldb_private::repro::Serializer::Serialize ( const char **  t)
inlineprivate

Definition at line 651 of file ReproducerInstrumentation.h.

◆ SerializeAll() [1/2]

template<typename Head , typename... Tail>
void lldb_private::repro::Serializer::SerializeAll ( const Head &  head,
const Tail &...  tail 
)
inline

Recursively serialize all the given arguments.

Definition at line 590 of file ReproducerInstrumentation.h.

Referenced by lldb_private::repro::Recorder::Record().

◆ SerializeAll() [2/2]

void lldb_private::repro::Serializer::SerializeAll ( )
inline

Definition at line 595 of file ReproducerInstrumentation.h.

Member Data Documentation

◆ m_stream

llvm::raw_ostream& lldb_private::repro::Serializer::m_stream
private

Serialization stream.

Definition at line 670 of file ReproducerInstrumentation.h.

◆ m_tracker

ObjectToIndex lldb_private::repro::Serializer::m_tracker
private

Mapping of objects to indices.

Definition at line 673 of file ReproducerInstrumentation.h.


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