LLVM 19.0.0git
Public Member Functions | List of all members
llvm::ManagedStatic< C, Creator, Deleter > Class Template Reference

ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on demand (good for reducing startup times of dynamic libraries that link in LLVM components) and for making destruction be explicit through the llvm_shutdown() function call. More...

#include "llvm/Support/ManagedStatic.h"

Inheritance diagram for llvm::ManagedStatic< C, Creator, Deleter >:
Inheritance graph
[legend]

Public Member Functions

Coperator* ()
 
Coperator-> ()
 
const Coperator* () const
 
const Coperator-> () const
 
Cclaim ()
 
- Public Member Functions inherited from llvm::ManagedStaticBase
constexpr ManagedStaticBase ()=default
 
bool isConstructed () const
 isConstructed - Return true if this object has not been created yet.
 
void destroy () const
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::ManagedStaticBase
void RegisterManagedStatic (void *(*creator)(), void(*deleter)(void *)) const
 
- Protected Attributes inherited from llvm::ManagedStaticBase
std::atomic< void * > Ptr {}
 
void(* DeleterFn )(void *) = nullptr
 
const ManagedStaticBaseNext = nullptr
 

Detailed Description

template<class C, class Creator = object_creator<C>, class Deleter = object_deleter<C>>
class llvm::ManagedStatic< C, Creator, Deleter >

ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on demand (good for reducing startup times of dynamic libraries that link in LLVM components) and for making destruction be explicit through the llvm_shutdown() function call.

Definition at line 83 of file ManagedStatic.h.

Member Function Documentation

◆ claim()

template<class C , class Creator = object_creator<C>, class Deleter = object_deleter<C>>
C * llvm::ManagedStatic< C, Creator, Deleter >::claim ( )
inline

Definition at line 108 of file ManagedStatic.h.

References llvm::CallingConv::C, and llvm::ManagedStaticBase::Ptr.

◆ operator*() [1/2]

template<class C , class Creator = object_creator<C>, class Deleter = object_deleter<C>>
C & llvm::ManagedStatic< C, Creator, Deleter >::operator* ( )
inline

◆ operator*() [2/2]

template<class C , class Creator = object_creator<C>, class Deleter = object_deleter<C>>
const C & llvm::ManagedStatic< C, Creator, Deleter >::operator* ( ) const
inline

◆ operator->() [1/2]

template<class C , class Creator = object_creator<C>, class Deleter = object_deleter<C>>
C * llvm::ManagedStatic< C, Creator, Deleter >::operator-> ( )
inline

Definition at line 94 of file ManagedStatic.h.

◆ operator->() [2/2]

template<class C , class Creator = object_creator<C>, class Deleter = object_deleter<C>>
const C * llvm::ManagedStatic< C, Creator, Deleter >::operator-> ( ) const
inline

Definition at line 104 of file ManagedStatic.h.


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