LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::ManagedStaticBase Class Reference

ManagedStaticBase - Common base class for ManagedStatic instances. More...

#include "llvm/Support/ManagedStatic.h"

Inheritance diagram for llvm::ManagedStaticBase:
Inheritance graph
[legend]

Public Member Functions

constexpr ManagedStaticBase ()=default
 
bool isConstructed () const
 isConstructed - Return true if this object has not been created yet.
 
void destroy () const
 

Protected Member Functions

void RegisterManagedStatic (void *(*creator)(), void(*deleter)(void *)) const
 

Protected Attributes

std::atomic< void * > Ptr {}
 
void(* DeleterFn )(void *) = nullptr
 
const ManagedStaticBaseNext = nullptr
 

Detailed Description

ManagedStaticBase - Common base class for ManagedStatic instances.

Definition at line 49 of file ManagedStatic.h.

Constructor & Destructor Documentation

◆ ManagedStaticBase()

constexpr llvm::ManagedStaticBase::ManagedStaticBase ( )
constexprdefault

Member Function Documentation

◆ destroy()

void ManagedStaticBase::destroy ( ) const

Definition at line 55 of file ManagedStatic.cpp.

References assert(), DeleterFn, Next, Ptr, and StaticList.

Referenced by llvm::llvm_shutdown().

◆ isConstructed()

bool llvm::ManagedStaticBase::isConstructed ( ) const
inline

isConstructed - Return true if this object has not been created yet.

Definition at line 71 of file ManagedStatic.h.

References Ptr.

◆ RegisterManagedStatic()

void ManagedStaticBase::RegisterManagedStatic ( void *(*)()  creator,
void(*)(void *)  deleter 
) const
protected

Member Data Documentation

◆ DeleterFn

void(* llvm::ManagedStaticBase::DeleterFn) (void *) = nullptr
mutableprotected

Definition at line 53 of file ManagedStatic.h.

Referenced by destroy(), and RegisterManagedStatic().

◆ Next

const ManagedStaticBase* llvm::ManagedStaticBase::Next = nullptr
mutableprotected

Definition at line 54 of file ManagedStatic.h.

Referenced by destroy(), and RegisterManagedStatic().

◆ Ptr

std::atomic<void *> llvm::ManagedStaticBase::Ptr {}
mutableprotected

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