class CrashRecoveryContextCleanupBase

Declaration

template <typename Derived, typename T>
class CrashRecoveryContextCleanupBase
    : public CrashRecoveryContextCleanup { /* full declaration omitted */ };

Description

Base class of cleanup handler that controls recovery of resources of the given type. 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.

Declared at: llvm/include/llvm/Support/CrashRecoveryContext.h:154

Inherits from: CrashRecoveryContextCleanup

Templates

Derived
Class that uses this class as a base.
T
Type of controlled resource.

Member Variables

protected T* resource

Inherited from CrashRecoveryContextCleanup:

protected context = nullptr
public cleanupFired = false

Method Overview

Inherited from CrashRecoveryContextCleanup:

Methods

CrashRecoveryContextCleanupBase<Derived, T>(
    llvm::CrashRecoveryContext* context,
    T* resource)

Declared at: llvm/include/llvm/Support/CrashRecoveryContext.h:157

Parameters

llvm::CrashRecoveryContext* context
T* resource

static Derived* create(T* x)

Description

Creates cleanup handler.

Declared at: llvm/include/llvm/Support/CrashRecoveryContext.h:165

Parameters

T* x
Pointer to the resource recovered by this handler.

Returns

New handler or null if the method was called outside a recovery context.