14 #include "llvm/Config/config.h" 34 void (*Deleter)(
void*))
const {
39 if (!
Ptr.load(std::memory_order_relaxed)) {
40 void *Tmp = Creator();
42 Ptr.store(Tmp, std::memory_order_release);
51 "Partially initialized ManagedStatic!?");
63 assert(StaticList ==
this &&
64 "Not destroyed in reverse order of construction?");
This class represents lattice values for constants.
const ManagedStaticBase * Next
static llvm::once_flag mutex_init_flag
static void initializeMutex()
void(* DeleterFn)(void *)
void llvm_shutdown()
llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
static std::recursive_mutex * getManagedStaticMutex()
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
bool llvm_is_multithreaded()
Returns true if LLVM is compiled with support for multi-threading, and false otherwise.
std::atomic< void * > Ptr
ManagedStaticBase - Common base class for ManagedStatic instances.
static const ManagedStaticBase * StaticList
static std::recursive_mutex * ManagedStaticMutex
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void RegisterManagedStatic(void *(*creator)(), void(*deleter)(void *)) const