[llvm-dev] LLVM_DYLIB and CLANG_DYLIB with MSVC

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 15 11:00:24 PDT 2021

On Mon, Jun 14, 2021 at 10:49 AM Tom Stellard via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> There is already the LLVM_EXTERNAL_VISIBILITY macro defined in
> llvm/Support/Compiler.h macro which is used in llvm/lib/Target.
> I would start using this one instead of creating a new LLVM_EXPORT macro.
> We can always rename the macro later if people like the name LLVM_EXPORT
> better.

IMO we should go ahead and do a renaming and make project-specific headers.
In the end, we need different macros for clang, lld, and llvm, and it seems
wrong to put all of those in llvm/Support/Compiler.h.

Personally, I like the *_EXPORT name, but the other widely used convention
is *_API. I think ICU uses that.

Here are some examples of existing export header templates:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210615/85646800/attachment.html>

More information about the llvm-dev mailing list