[PATCH] D27430: [libc++] Annotate template methods with visibility

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 19:37:26 PST 2017


smeenai added a comment.

In https://reviews.llvm.org/D27430#632652, @EricWF wrote:

> Please put these attributes to the first declaration instead of the definition.


Sounds good to me for `_LIBCPP_HIDDEN`, but as far as I understand, for the `inline _LIBCPP_INLINE_VISIBILITY` cases, at least the `inline` needs to be at the definition itself, otherwise it won't have any effect. For those, do you want to keep the `_LIBCPP_INLINE_VISIBILITY` at the declaration and the `inline` at the definition?



================
Comment at: include/thread:392
 template <class _Fp>
+_LIBCPP_HIDDEN
 thread::thread(_Fp __f)
----------------
EricWF wrote:
> We really should hide this using `inline _LIBCPP_INLINE_VISIBILITY` because it's a special C++03 symbol, so we don't even want a hidden definition omitted ideally.
Will do.


https://reviews.llvm.org/D27430





More information about the cfe-commits mailing list