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

Helper macro to declare registry class&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(REGISTRY&lowbar;CLASS)

----

== Description

The `LLVM&lowbar;ABI&lowbar;EXPORT` (i&period;e&period; &lowbar;&lowbar;delcpsec(dllexport) on Win32) attached to the declaration is mandatory since MSVC disallows adding dllexport after the first non&hyphen;exported specialization declaration, and it is generally safe&period; All of link&period;exe, ld&period;bfd, and lld&hyphen;link will attempt to import undefined symbols (including template specializations) from DLLs, even if the symbol is declared with dllexport, just like non&hyphen;imported symbols&period; 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&period;


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