[llvm] [llvm] add documentation for public interface annotations (LLVM_ABI, etc) (PR #134710)

Thomas Fransham via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 11:32:49 PDT 2025


fsfod wrote:

I can list some edge cases that might be worth including in some way:
- Taking address of a imported function is not is a valid constexpr at least for clang on windows. I've seen this happen multiple times in the LLVM and Clang codebase.
- If a class has some existing attributes there can be issues with adding the visibility attribute for some older compilers https://github.com/tstellar/template-visibility/blob/testing/templates.h.
- dllimport\dllexport can't go before other attributes when built with clang-cl [example](https://compiler-explorer.com/z/rWMcTTTK1).
- MSVC has ancient unfixed bug where a dllexported class declares two or more static variables on the same line results in a compile error https://developercommunity.visualstudio.com/t/c2487-in-dllexport-class-with-static-members/69878.
- There are some explicit template instantiations that indirectly derive from a STL class like cl::opt<std::string> that can't be exported because you will get missing symbol errors for symbols that should of come from the c++ runtime shared library i think. There might also be some bug with MSVC and cl::opt specializations for primitive types  like cl::opt<int> where its not exported from the file with the explicit instantiation definition with it being used in a function. 

https://github.com/llvm/llvm-project/pull/134710


More information about the llvm-commits mailing list