This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Replace some _LIBCPP_HIDDEN with _LIBCPP_HIDE_FROM_ABI
ClosedPublic

Authored by daltenty on Oct 7 2022, 6:55 PM.

Details

Summary

These "implementation detail" function templates were already
hidden and have no specializations in the dylib, so they seem like they can safely
use _LIBCPP_HIDE_FROM_ABI instead and have the abi tags applied as well.

Seems some of these got over looked (e.g. D129823) in various places, and they
won't be flagged by the new checks added in D129968, as they were
already hidden.

Diff Detail

Event Timeline

daltenty created this revision.Oct 7 2022, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 6:55 PM
daltenty requested review of this revision.Oct 7 2022, 6:55 PM
ldionne added a reviewer: Restricted Project.Oct 11 2022, 8:21 AM

I'm not sure why the libc++ review group wasn't added on this revision automatically.

I'm fine with this, but it won't work for __gcd since we still use always_inline on GCC to approximate __exclude_from_explicit_instantitation__. We could technically not use that attribute at all since this isn't a member function, but I don't think this is worth the inconsistency.

ldionne accepted this revision.Oct 11 2022, 8:21 AM

LGTM with green CI.

This revision is now accepted and ready to land.Oct 11 2022, 8:21 AM
daltenty updated this revision to Diff 466953.Oct 11 2022, 3:36 PM

Remove __gcd from the patch, as the always_inline we use in the macro for gcc causes problems in this recursive case.

ldionne accepted this revision.Oct 12 2022, 6:34 AM

LGTM with passing CI!

Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 1:47 PM