[PATCH] D54479: Mark some library types and templates with visibility+availability attributes.

Arthur O'Dwyer via Phabricator reviews at reviews.llvm.org
Tue Nov 13 15:28:28 PST 2018

Quuxplusone marked 4 inline comments as done.
Quuxplusone added inline comments.

Comment at: include/shared_mutex:310
 template <class _Mutex>
-class shared_lock
+class _LIBCPP_TEMPLATE_VIS shared_lock
ldionne wrote:
> We don't seem to be exporting anything related to `shared_lock` from the dylib, so I would leave this out.
The dylib doesn't have any symbols related to `deque`, either, right? Yet libc++ does
I guess I still want the simple rule to be "if it's part of the library's public API _or_ mangled into the dylib, it gets a visibility attribute."
If the visibility attributes are really only for things mangled into the dylib, then a whole lot of things could safely lose their visibility attributes — basically most of the STL. And then there wouldn't really be any consistent rule; it'd just be "don't write a visibility attribute on anything until someone reports that it's broken, and then add one exactly where it's needed." But that sounds impossibly hard to get right. I'd still rather make a rule, even if it results in some "extra" annotation.

  rCXX libc++


More information about the libcxx-commits mailing list