This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix link error with _LIBCPP_HIDE_FROM_ABI_PER_TU and std::string
ClosedPublic

Authored by ldionne on Jul 18 2019, 12:39 PM.

Details

Summary

This is effectively a revert of r344616, which was a partial fix for
PR38964 (compilation of <string> with GCC in C++03 mode). However, that
configuration is explicitly not supported anymore and that partial fix
breaks compilation with Clang when per-TU insulation is provided.

PR42676
rdar://52899715

Diff Detail

Repository
rL LLVM

Event Timeline

ldionne created this revision.Jul 18 2019, 12:39 PM
mclow.lists accepted this revision.Jul 18 2019, 3:04 PM

The first three removals are fine.
I don't remember why I put the last two in, but I guess I'm OK with them.

This revision is now accepted and ready to land.Jul 18 2019, 3:04 PM
EricWF added a comment.EditedJul 18 2019, 3:29 PM

This change isn't strictly correct. A lot of these constructors were externally instantiated before we made them templates.
I suspect this will break the ABI.

We'll need to wrap these in _LIBCPP_BUILDING_LIBRARY to continue generating the old definitions.

EricWF accepted this revision.Jul 18 2019, 8:08 PM

@ldionne pointed out to me that I'm all kinds of wrong.

LGTM. Sorry about the confusion.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2019, 4:52 AM