[PATCH] D24602: [libc++] Fix and document visibility attributes for Clang, GCC and Windows.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 02:10:18 PDT 2016


EricWF created this revision.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.
Herald added subscribers: mgorny, beanz.

This patch fixes a number of problems with the visibility macros across GCC (on Unix) and Windows (DLL import/export semantics). All of the visibility macros are now documented under `DesignDocs/VisibilityMacros.rst`. Now I'll no longer forget the subtleties of each!

This patch adds two new visibility macros:

* `_LIBCPP_ENUM_VIS` for controlling the typeinfo of enum types. Only Clang supports this.
* `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` for redefining visibility on explicit instantiation declarations. Clang and Windows require this.

After applying this patch GCC only emits one -Wattribute warning opposed to 30+.


https://reviews.llvm.org/D24602

Files:
  CMakeLists.txt
  docs/DesignDocs/VisibilityMacros.rst
  docs/index.rst
  include/__config
  include/__locale
  include/__string
  include/experimental/filesystem
  include/istream
  include/locale
  include/ostream
  include/streambuf
  include/string
  include/vector

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24602.71483.patch
Type: text/x-patch
Size: 25299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160915/2ba2922c/attachment-0001.bin>


More information about the cfe-commits mailing list