This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Export 2 basic_string methods to minimize the effect from internal_linkage switch
Needs ReviewPublic

Authored by eugenis on Dec 10 2015, 2:54 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The switch to internal_linkage attribute removes 3 symbols from the libc++ export table, all in basic_string:
insert(..., InputIterator
insert(..., ForwardIterator
replace(..., InputIterator

These are template methods of a template class. They are instantiated only in functions/methods that are marked with LIBCPP_INLINE_VISIBILITY; normally they are exported as linkonce_odr; after the internal_linkage switch they are not instantiated at all because their callers are never evaluated.

This change explicitly exports these methods to avoid this problem. It does not change the export list of libc++.so in any way.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 42466.Dec 10 2015, 2:54 PM
eugenis retitled this revision from to [libcxx] Export 2 basic_string methods to minimize the effect from internal_linkage switch.
eugenis updated this object.
eugenis added a reviewer: EricWF.
eugenis set the repository for this revision to rL LLVM.
eugenis added a subscriber: cfe-commits.
EricWF resigned from this revision.Dec 30 2016, 3:47 AM
EricWF removed a reviewer: EricWF.

Resigning as reviewer. These changes are quite old, and can be redone if needed. In all likelihood I think I would rather remove the symbols from the dylib instead of keep them.