LLVM 20.0.0git
Classes | Public Types | Static Public Member Functions | Friends | List of all members
llvm::Registry< T > Class Template Reference

A global registry used in conjunction with static constructors to make pluggable components (like targets or garbage collectors) "just work" when linked with an executable. More...

#include "llvm/Support/Registry.h"

Classes

class  Add
 A static registration template. More...
 
class  iterator
 Iterators for registry entries. More...
 
class  node
 Node in linked list of entries. More...
 

Public Types

typedef T type
 
typedef SimpleRegistryEntry< Tentry
 

Static Public Member Functions

static void add_node (node *N)
 Add a node to the Registry: this is the interface between the plugin and the executable.
 
static iterator begin ()
 
static iterator end ()
 
static iterator_range< iteratorentries ()
 

Friends

class node
 

Detailed Description

template<typename T>
class llvm::Registry< T >

A global registry used in conjunction with static constructors to make pluggable components (like targets or garbage collectors) "just work" when linked with an executable.

Definition at line 44 of file Registry.h.

Member Typedef Documentation

◆ entry

template<typename T >
typedef SimpleRegistryEntry<T> llvm::Registry< T >::entry

Definition at line 47 of file Registry.h.

◆ type

template<typename T >
typedef T llvm::Registry< T >::type

Definition at line 46 of file Registry.h.

Member Function Documentation

◆ add_node()

template<typename T >
static void llvm::Registry< T >::add_node ( node N)
inlinestatic

Add a node to the Registry: this is the interface between the plugin and the executable.

This function is exported by the executable and called by the plugin to add a node to the executable's registry. Therefore it's not defined here to avoid it being instantiated in the plugin and is instead defined in the executable (see LLVM_INSTANTIATE_REGISTRY below).

Definition at line 85 of file Registry.h.

References N, and llvm::CallingConv::Tail.

Referenced by llvm::Registry< T >::Add< V >::Add().

◆ begin()

template<typename T >
static iterator llvm::Registry< T >::begin ( )
inlinestatic

Definition at line 110 of file Registry.h.

Referenced by llvm::Registry< T >::entries(), and llvm::getGCStrategy().

◆ end()

template<typename T >
static iterator llvm::Registry< T >::end ( )
inlinestatic

Definition at line 111 of file Registry.h.

Referenced by llvm::Registry< T >::entries(), and llvm::getGCStrategy().

◆ entries()

template<typename T >
static iterator_range< iterator > llvm::Registry< T >::entries ( )
inlinestatic

Friends And Related Function Documentation

◆ node

template<typename T >
friend class node
friend

Definition at line 55 of file Registry.h.


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