This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix backdeployment annotations for std::filesystem
ClosedPublic

Authored by ldionne on Nov 23 2021, 9:48 AM.

Details

Reviewers
jloser
Group Reviewers
Restricted Project
Commits
rG7a0584fe3fd6: [libc++] Fix backdeployment annotations for std::filesystem
Summary

In 1fa27f2a10e8, we made <filesystem>'s iterator types model concepts
from <ranges>, but we forgot to add the appropriate availability
annotations. This broke back-deployment to platforms that don't have
<filesystem> for which we have availability annotations.

For some reason, this wasn't caught by our back-deployment CI.
I believe this is due to the fact that we use a slightly older
compiler in the CI, and perhaps that compiler does not honour
our #pragma clang attribute push properly.

Diff Detail

Event Timeline

ldionne requested review of this revision.Nov 23 2021, 9:48 AM
ldionne created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 9:48 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
jloser accepted this revision.Nov 23 2021, 10:52 AM

LGTM. Thanks for fixing this! I wish it could have been caught by CI when it was introduced, so that's room for future improvement.

Do we need to do _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH and corresponding _LIBCPP_AVAILABILITY_FILESYSTEM_POP around these template specializations to workaround https://bugs.llvm.org/show_bug.cgi?id=41078? I think the answer is "No", but wanted to confirm. :)

ldionne accepted this revision as: Restricted Project.Nov 24 2021, 1:57 PM

LGTM. Thanks for fixing this! I wish it could have been caught by CI when it was introduced, so that's room for future improvement.

Do we need to do _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH and corresponding _LIBCPP_AVAILABILITY_FILESYSTEM_POP around these template specializations to workaround https://bugs.llvm.org/show_bug.cgi?id=41078? I think the answer is "No", but wanted to confirm. :)

Nope, it doesn't seem necessary, perhaps because directory_iterator isn't a template. I'm not too sure.

This revision is now accepted and ready to land.Nov 24 2021, 1:57 PM