[#LLVM_DECLARE_REGISTRY_EX]
= LLVM&lowbar;DECLARE&lowbar;REGISTRY&lowbar;EX
:mrdocs:

Variants of the registration macros that take an explicit export annotation (EXPORT&lowbar;ABI) in place of the hard&hyphen;coded `LLVM&lowbar;ABI&lowbar;EXPORT`&period; Use these when a registry is owned by a component that is NOT part of the LLVM dylib&period; For example, a clang library that is statically linked (`CLANG&lowbar;LINK&lowbar;CLANG&lowbar;DYLIB` OFF)&period; With `LLVM&lowbar;ABI&lowbar;EXPORT` the `getRegistryLinkListInstance` accessor is unconditionally `dllexport`ed&semi; when such a static component is embedded in a DLL that should only export its own API surface (e&period;g&period; libclang&period;dll), the accessor leaks into that DLL&apos;s export table and then collides on the link line of any tool that also links the static component directly&period;

== Synopsis

Declared in `&lt;llvm&sol;Support&sol;Registry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define LLVM&lowbar;DECLARE&lowbar;REGISTRY&lowbar;EX(EXPORT&lowbar;ABI, REGISTRY&lowbar;CLASS)

----

== Description

EXPORT&lowbar;ABI must export&hyphen;or&hyphen;be&hyphen;empty, NEVER dllimport, for the same reason `LLVM&lowbar;ABI&lowbar;EXPORT` is used here rather than `LLVM&lowbar;ABI`&colon; the definition may be in the same object, a static library, or an import library&period; `CLANG&lowbar;ABI&lowbar;EXPORT` satisfies this (it is empty under `CLANG&lowbar;BUILD&lowbar;STATIC`)&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
