[llvm] [Support] Add clang tooling generated explicit visibility macros (PR #113097)

Thomas Fransham via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 14:28:24 PST 2024


================

----------------
fsfod wrote:

Yes the idea is automate adding new annotations by running something like post commit action like gn syncbot does. There some discussion about this in the Clang PR https://github.com/llvm/llvm-project/pull/109702. 

> It is still the LIBRARY_VISIBILITY one?

I just added a new macro LLVM_ABI_NOT_EXPORTED that the tool looks for, I never really though about reusing LIBRARY_VISIBILITY maybe i could. It would have to be not defined when the tool runs so the tool can define it as a clang annotate attribute it can find.
One of the extra goals is default symbol visibility is eventually set to hidden for non windows platforms to also reduce the number of exported symbols for them https://github.com/llvm/llvm-project/issues/19707. 

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


More information about the llvm-commits mailing list