This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Define legacy symbols for inline functions at a finer-grained level
ClosedPublic

Authored by ldionne on Apr 11 2022, 9:37 AM.

Details

Summary

When we build the library with the stable ABI, we need to include some
functions in the dylib that were made inline in later versions of the
library (to avoid breaking code that might be relying on those symbols).

However, those methods were made non-inline whenever we'd be building
the library, which means that all translation units would end up using
the old out-of-line definition of these methods, as opposed to the new
inlined version. This patch makes it so that only the translation units
that actually define the out-of-line methods use the old definition,
opening up potential optimization opportunities in other translation
units.

This should solve some of the issues encountered in D65667.

Diff Detail

Event Timeline

ldionne created this revision.Apr 11 2022, 9:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 9:37 AM
ldionne requested review of this revision.Apr 11 2022, 9:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 9:37 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision as: Restricted Project.Apr 12 2022, 10:44 AM

I'm going to ship this -- I'm about to go OOO until May and I'd like to unblock work on D65667.

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