14#include "llvm/Config/config.h"
23 static std::recursive_mutex m;
28 void (*Deleter)(
void*))
const {
33 if (!
Ptr.load(std::memory_order_relaxed)) {
34 void *Tmp = Creator();
36 Ptr.store(Tmp, std::memory_order_release);
45 "Partially initialized ManagedStatic!?");
58 "Not destroyed in reverse order of construction?");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static std::recursive_mutex * getManagedStaticMutex()
static const ManagedStaticBase * StaticList
ManagedStaticBase - Common base class for ManagedStatic instances.
LLVM_ABI void RegisterManagedStatic(void *(*creator)(), void(*deleter)(void *)) const
void(* DeleterFn)(void *)
const ManagedStaticBase * Next
std::atomic< void * > Ptr
LLVM_ABI void destroy() const
This is an optimization pass for GlobalISel generic memory operations.
constexpr bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
LLVM_ABI void llvm_shutdown()
llvm_shutdown - Deallocate and destroy all ManagedStatic variables.