LLDB  mainline
Public Member Functions | List of all members
lldb_private::repro::Generator Class Referencefinal

The generator is responsible for the logic needed to generate a reproducer. More...

#include <Reproducer.h>

Public Member Functions

 Generator (const FileSpec &root)
 
 ~Generator ()
 
void Keep ()
 Method to indicate we want to keep the reproducer. More...
 
void Discard ()
 Method to indicate we do not want to keep the reproducer. More...
 
template<typename T >
T * Create ()
 Create and register a new provider. More...
 
template<typename T >
T * Get ()
 Get an existing provider. More...
 
template<typename T >
T & GetOrCreate ()
 Get a provider if it exists, otherwise create it. More...
 
const FileSpecGetRoot () const
 

Detailed Description

The generator is responsible for the logic needed to generate a reproducer.

For doing so it relies on providers, who serialize data that is necessary for reproducing a failure.

Definition at line 169 of file Reproducer.h.

Constructor & Destructor Documentation

◆ Generator()

Generator::Generator ( const FileSpec root)

Definition at line 139 of file Reproducer.cpp.

◆ ~Generator()

Generator::~Generator ( )

Definition at line 141 of file Reproducer.cpp.

Member Function Documentation

◆ Create()

template<typename T >
T* lldb_private::repro::Generator::Create ( )
inline

Create and register a new provider.

Definition at line 184 of file Reproducer.h.

◆ Discard()

void Generator::Discard ( )

Method to indicate we do not want to keep the reproducer.

This is unaffected by whether or not generation reproduction is enabled, as we might need to clean up files already written to disk.

Definition at line 161 of file Reproducer.cpp.

References lldb_private::FileSpec::GetPath().

◆ Get()

template<typename T >
T* lldb_private::repro::Generator::Get ( )
inline

Get an existing provider.

Definition at line 190 of file Reproducer.h.

◆ GetOrCreate()

template<typename T >
T& lldb_private::repro::Generator::GetOrCreate ( )
inline

Get a provider if it exists, otherwise create it.

Definition at line 198 of file Reproducer.h.

◆ GetRoot()

const FileSpec & Generator::GetRoot ( ) const

◆ Keep()

void Generator::Keep ( )

Method to indicate we want to keep the reproducer.

If reproducer generation is disabled, this does nothing.

Definition at line 151 of file Reproducer.cpp.


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