<div dir="ltr"><div dir="ltr">On Mon, Jun 14, 2021 at 10:49 AM Tom Stellard via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is already the LLVM_EXTERNAL_VISIBILITY macro defined in<br>
llvm/Support/Compiler.h macro which is used in llvm/lib/Target.<br>
I would start using this one instead of creating a new LLVM_EXPORT macro.<br>
We can always rename the macro later if people like the name LLVM_EXPORT<br>
better.<br></blockquote><div><br></div><div>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.</div><div><br></div><div>Personally, I like the *_EXPORT name, but the other widely used convention is *_API. I think ICU uses that.</div><div><br></div><div>Here are some examples of existing export header templates:</div><div><a href="https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html">https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html</a><br></div><div><a href="https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/exportheader.cmake.in">https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/exportheader.cmake.in</a><br></div><div><a href="https://source.chromium.org/chromium/chromium/src/+/main:base/base_export.h;l=12?q=base_export%20&ss=chromium">https://source.chromium.org/chromium/chromium/src/+/main:base/base_export.h;l=12?q=base_export%20&ss=chromium</a><br></div><div><br></div><div></div></div></div>