Get the current value, or call Generator to generate a value. Guarantees that only one thread's Generator will run.
Declared in <llvm/ADT/LazyAtomicPointer.h>
T&
loadOrGenerate(function_ref<T*()> Generator);
Reference to the stored (or newly generated) value.
| Name | Description |
|---|---|
| Generator | Callable that produces a non-null pointer when the stored value is null. |
Generator doesn't return nullptr.