|
LLVM 23.0.0git
|
#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/STLFunctionalExtras.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/iterator_range.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/DynamicLibrary.h"#include <memory>Go to the source code of this file.
Classes | |
| class | llvm::SimpleRegistryEntry< T, CtorParamTypes > |
| A simple registry entry which provides only a name, description, and an CtorParamTypes&& variadic parameterized constructor. More... | |
| struct | llvm::detail::IsRegistryType< R > |
| struct | llvm::detail::IsRegistryType< Registry< T, CtorParamTypes... > > |
| struct | llvm::detail::RegistryLinkListStorage< R > |
| The endpoint to the instance to hold registered components by a linked list. More... | |
| struct | llvm::detail::RegistryLinkListDeclarationMarker< R > |
| Utility to guard against missing declarations or mismatched use of LLVM_DECLARE_REGISTRY and LLVM_INSTANTIATE_REGISTRY. More... | |
| class | llvm::Registry< T, CtorParamTypes > |
| 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... | |
| class | llvm::Registry< T, CtorParamTypes >::node |
| Node in linked list of entries. More... | |
| class | llvm::Registry< T, CtorParamTypes >::iterator |
| Iterators for registry entries. More... | |
| class | llvm::Registry< T, CtorParamTypes >::Add< V > |
| A static registration template. More... | |
Namespaces | |
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. | |
| namespace | llvm::detail |
| A self-contained host- and target-independent arbitrary-precision floating-point software implementation. | |
Macros | |
| #define | LLVM_DECLARE_REGISTRY(REGISTRY_CLASS) |
| Helper macro to declare registry class. | |
| #define | LLVM_DEFINE_REGISTRY(REGISTRY_CLASS) |
| Helper macro to define registry class. | |
| #define | LLVM_DETAIL_INSTANTIATE_REGISTRY_1(ABITAG, REGISTRY_CLASS) |
| #define | LLVM_INSTANTIATE_REGISTRY(REGISTRY_CLASS) |
| Old style helper macro to instantiate registry class. | |
| #define | LLVM_DECLARE_REGISTRY_EX(EXPORT_ABI, REGISTRY_CLASS) |
| Variants of the registration macros that take an explicit export annotation (EXPORT_ABI) in place of the hard-coded LLVM_ABI_EXPORT. | |
| #define | LLVM_DEFINE_REGISTRY_EX(EXPORT_ABI, REGISTRY_CLASS) |
| #define | LLVM_INSTANTIATE_REGISTRY_EX(EXPORT_ABI, REGISTRY_CLASS) |
Functions | |
| template<typename R> | |
| RegistryLinkListStorage< R > & | llvm::detail::getRegistryLinkListInstance () |
| The accessor to the endpoint. | |
| #define LLVM_DECLARE_REGISTRY | ( | REGISTRY_CLASS | ) |
Helper macro to declare registry class.
The LLVM_ABI_EXPORT (i.e. __delcpsec(dllexport) on Win32) attached to the declaration is mandatory since MSVC disallows adding dllexport after the first non-exported specialization declaration, and it is generally safe. All of link.exe, ld.bfd, and lld-link will attempt to import undefined symbols (including template specializations) from DLLs, even if the symbol is declared with dllexport, just like non-imported symbols. The dllimport attribute is not eligible here, since the specialization may or may not be defined in the same object, a static library, or an import library.
Definition at line 221 of file Registry.h.
| #define LLVM_DECLARE_REGISTRY_EX | ( | EXPORT_ABI, | |
| REGISTRY_CLASS ) |
Variants of the registration macros that take an explicit export annotation (EXPORT_ABI) in place of the hard-coded LLVM_ABI_EXPORT.
Use these when a registry is owned by a component that is NOT part of the LLVM dylib. For example, a clang library that is statically linked (CLANG_LINK_CLANG_DYLIB OFF). With LLVM_ABI_EXPORT the getRegistryLinkListInstance accessor is unconditionally dllexported; when such a static component is embedded in a DLL that should only export its own API surface (e.g. libclang.dll), the accessor leaks into that DLL's export table and then collides on the link line of any tool that also links the static component directly.
EXPORT_ABI must export-or-be-empty, NEVER dllimport, for the same reason LLVM_ABI_EXPORT is used here rather than LLVM_ABI: the definition may be in the same object, a static library, or an import library. CLANG_ABI_EXPORT satisfies this (it is empty under CLANG_BUILD_STATIC).
Definition at line 287 of file Registry.h.
| #define LLVM_DEFINE_REGISTRY | ( | REGISTRY_CLASS | ) |
Helper macro to define registry class.
Technically, these macros don't instantiate Registry despite the name. They handle underlying storage that used by Registry indirectly, enforcing proper declarations/definitions by compilers or linkers. If you forget to place LLVM_DEFINE_REGISTRY, your linker will complain about a missing getRegistryLinkListInstance definiton.
Definition at line 238 of file Registry.h.
| #define LLVM_DEFINE_REGISTRY_EX | ( | EXPORT_ABI, | |
| REGISTRY_CLASS ) |
Definition at line 297 of file Registry.h.
| #define LLVM_DETAIL_INSTANTIATE_REGISTRY_1 | ( | ABITAG, | |
| REGISTRY_CLASS ) |
Definition at line 252 of file Registry.h.
| #define LLVM_INSTANTIATE_REGISTRY | ( | REGISTRY_CLASS | ) |
Old style helper macro to instantiate registry class.
Definition at line 269 of file Registry.h.
| #define LLVM_INSTANTIATE_REGISTRY_EX | ( | EXPORT_ABI, | |
| REGISTRY_CLASS ) |
Definition at line 311 of file Registry.h.