This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Instantiate additional <iostream> members in the dylib
ClosedPublic

Authored by ldionne on Nov 3 2020, 4:56 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG997d41cdec53: [libc++] Instantiate additional <iostream> members in the dylib
Summary

This commit adds new explicit instantiations for some classes in <iostream>
in the library. This is done after noticing that many programs that use
streams end up containing weak definitions of these classes, which has a
negative impact on both code size and load times (due to the need to
resolve weak symbols at load time). Note that we are just adding the
additional explicit instantiations for the char specializations, since
the wchar_t specializations are not used as often, and as a result there
wouldn't be a clear benefit.

This change is not an ABI break, since we are just adding additional
symbols.

Diff Detail

Event Timeline

ldionne created this revision.Nov 3 2020, 4:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 3 2020, 4:56 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested review of this revision.Nov 3 2020, 4:56 AM
ldionne updated this revision to Diff 304879.Nov 12 2020, 9:50 AM

Fix build on GCC by adding a forgotten inline

This revision was not accepted when it landed; it landed in state Needs Review.Nov 12 2020, 10:53 AM
This revision was automatically updated to reflect the committed changes.