LLVM  8.0.1
Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::CrashRecoveryContextCleanupBase< Derived, T > Class Template Reference

Base class of cleanup handler that controls recovery of resources of the given type. More...

#include "llvm/Support/CrashRecoveryContext.h"

Inheritance diagram for llvm::CrashRecoveryContextCleanupBase< Derived, T >:
Inheritance graph
[legend]
Collaboration diagram for llvm::CrashRecoveryContextCleanupBase< Derived, T >:
Collaboration graph
[legend]

Static Public Member Functions

static Derived * create (T *x)
 Creates cleanup handler. More...
 

Protected Member Functions

 CrashRecoveryContextCleanupBase (CrashRecoveryContext *context, T *resource)
 
- Protected Member Functions inherited from llvm::CrashRecoveryContextCleanup
 CrashRecoveryContextCleanup (CrashRecoveryContext *context)
 

Protected Attributes

Tresource
 
- Protected Attributes inherited from llvm::CrashRecoveryContextCleanup
CrashRecoveryContextcontext
 

Additional Inherited Members

- Public Member Functions inherited from llvm::CrashRecoveryContextCleanup
virtual ~CrashRecoveryContextCleanup ()
 
virtual void recoverResources ()=0
 
CrashRecoveryContextgetContext () const
 
- Public Attributes inherited from llvm::CrashRecoveryContextCleanup
bool cleanupFired
 

Detailed Description

template<typename Derived, typename T>
class llvm::CrashRecoveryContextCleanupBase< Derived, T >

Base class of cleanup handler that controls recovery of resources of the given type.

Template Parameters
DerivedClass that uses this class as a base.
TType of controlled resource.

This class serves as a base for its template parameter as implied by Curiously Recurring Template Pattern.

This class factors out creation of a cleanup handler. The latter requires knowledge of the current recovery context, which is provided by this class.

Definition at line 146 of file CrashRecoveryContext.h.

Constructor & Destructor Documentation

◆ CrashRecoveryContextCleanupBase()

template<typename Derived, typename T>
llvm::CrashRecoveryContextCleanupBase< Derived, T >::CrashRecoveryContextCleanupBase ( CrashRecoveryContext context,
T resource 
)
inlineprotected

Definition at line 149 of file CrashRecoveryContext.h.

Member Function Documentation

◆ create()

template<typename Derived, typename T>
static Derived* llvm::CrashRecoveryContextCleanupBase< Derived, T >::create ( T x)
inlinestatic

Creates cleanup handler.

Parameters
xPointer to the resource recovered by this handler.
Returns
New handler or null if the method was called outside a recovery context.

Definition at line 157 of file CrashRecoveryContext.h.

Member Data Documentation

◆ resource

template<typename Derived, typename T>
T* llvm::CrashRecoveryContextCleanupBase< Derived, T >::resource
protected

Definition at line 148 of file CrashRecoveryContext.h.


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