Page MenuHomePhabricator

[darwin] add support for __isPlatformVersionAtLeast check for if (@available)
ClosedPublic

Authored by arphaman on Oct 28 2020, 11:02 PM.

Details

Summary

The __isPlatformVersionAtLeast routine is an implementation of if (@available) check
that uses the _availability_version_check API on Darwin that's supported on
macOS 10.15, iOS 13, tvOS 13 and watchOS 6.

Diff Detail

Event Timeline

arphaman created this revision.Oct 28 2020, 11:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 28 2020, 11:02 PM
Herald added subscribers: Restricted Project, ributzka, dmgreen, jkorous. · View Herald Transcript
arphaman requested review of this revision.Oct 28 2020, 11:03 PM
thakis accepted this revision.Oct 29 2020, 10:34 AM

Thanks!

clang/lib/CodeGen/CGObjC.cpp
3874

Isn't the rest of the function basically dead code? Do non-darwin targets support this feature? As far as I can tell, they don't?

This revision is now accepted and ready to land.Oct 29 2020, 10:34 AM
arphaman added inline comments.Mon, Nov 2, 3:20 PM
clang/lib/CodeGen/CGObjC.cpp
3874

Yes, there's support for Android since https://reviews.llvm.org/D86596

This revision was landed with ongoing or failed builds.Mon, Nov 2, 4:28 PM
This revision was automatically updated to reflect the committed changes.