13#ifndef LLVM_SUPPORT_REGISTRY_H
14#define LLVM_SUPPORT_REGISTRY_H
29 std::unique_ptr<T> (*Ctor)();
125 template <
typename V>
130 static std::unique_ptr<T> CtorFn() {
return std::make_unique<V>(); }
144#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
146 template <typename T> \
147 typename Registry<T>::node *Registry<T>::Head = nullptr; \
148 template <typename T> \
149 typename Registry<T>::node *Registry<T>::Tail = nullptr; \
150 template class LLVM_ABI_EXPORT Registry<REGISTRY_CLASS::type>; \
153#define LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) \
155 template <typename T> \
156 typename Registry<T>::node *Registry<T>::Head = nullptr; \
157 template <typename T> \
158 typename Registry<T>::node *Registry<T>::Tail = nullptr; \
159 template class Registry<REGISTRY_CLASS::type>; \
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
A static registration template.
Add(StringRef Name, StringRef Desc)
Iterators for registry entries.
const entry & operator*() const
bool operator==(const iterator &That) const
Node in linked list of entries.
A global registry used in conjunction with static constructors to make pluggable components (like tar...
static iterator_range< iterator > entries()
SimpleRegistryEntry< T > entry
static void add_node(node *N)
Add a node to the Registry: this is the interface between the plugin and the executable.
A simple registry entry which provides only a name, description, and no-argument constructor.
SimpleRegistryEntry(StringRef N, StringRef D, std::unique_ptr< T >(*C)())
StringRef getName() const
StringRef getDesc() const
std::unique_ptr< T > instantiate() const
StringRef - Represent a constant reference to a string, i.e.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
A range adaptor for a pair of iterators.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
@ Tail
Attemps to make calls as fast as possible while guaranteeing that tail call optimization can always b...
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Description of the encoding of one expression Op.