This is an archive of the discontinued LLVM Phabricator instance.

rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
AbandonedPublic

Authored by compnerd on Jul 15 2014, 7:18 PM.

Details

Summary

Add _LIBCPP_TEMPLATE_VIS. The new name is more descriptive of what the
intention is. The previous name did not convey the intention of the decoration.
This is mostly a mechanical change, changing instances of _LIBCPP_TYPE_VIS_ONLY
where they were applied to template instances.

Diff Detail

Event Timeline

compnerd updated this revision to Diff 11485.Jul 15 2014, 7:18 PM
compnerd retitled this revision from to rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS.
compnerd updated this object.
compnerd edited the test plan for this revision. (Show Details)
compnerd added reviewers: mclow.lists, nrieck.
compnerd set the repository for this revision to rL LLVM.
compnerd added subscribers: abdulras, rnk, Unknown Object (MLST).
rnk added a comment.Jul 17 2014, 1:49 PM

This naming change makes a lot of sense to me.

The reason we have this alternative macro is because it makes no sense to dllexport a template. MSVC's semantics for it are not useful at all.

rnk added a comment.Jul 29 2014, 5:30 PM

I don't think we should be using this linkage on non-template types, even if Howard thought they were "header only". Even those tag types can be exported from libc++. If someone takes the address of a tag or once_flag assignment operator, libc++ should have a definition of it. Marking it as dllexport (aka _LIBCPP_TYPE_VISIBILITY) makes that work.

On the other hand, we have things like struct nullptr_t, which are never compiled while building libc++ itself. Saleem has moved to give them no decoration, which means each DSO would get its own set of member functions with distinct addresses.

The upshot is I think we should go forward with this change. This attribute really shouldn't be applied to non-template types, despite what Howard said in the past.

compnerd updated this revision to Diff 12887.Aug 24 2014, 1:51 PM
compnerd updated this object.
compnerd edited edge metadata.
EricWF resigned from this revision.Dec 30 2016, 3:50 AM
EricWF removed a reviewer: EricWF.

This version of the patch is super old. A branch new version is up for review here: https://reviews.llvm.org/D28174 If there are no objections I'll commit that patch tomorrow.

compnerd abandoned this revision.Jan 6 2017, 7:25 AM
compnerd added a subscriber: EricWF.

This already was done by @EricWF