[PATCH] D27827: [ObjC] CodeGen support for @available on macOS
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 19 08:35:33 PST 2017
erik.pilkington updated this revision to Diff 89067.
erik.pilkington added a comment.
This new patch just generates a call to the function `_IsOSVersionAtLeast` and branches on the result. `_IsOSVersionAtLeast` is going through review here: https://reviews.llvm.org/D30136.
I decided to parse the SystemVersion.plist file, I think mapping from kernel versions to marketing versions works for macOS, but not for iOS, as iOS tends to cling on to darwin versions for longer. For example, darwin 14.0.0 was used from iOS 7.0 until iOS 8.4.1, (based on the table here: https://www.theiphonewiki.com/wiki/Kernel) which is not fine grain enough for use with `@available`.
Thanks for taking a look!
Erik
https://reviews.llvm.org/D27827
Files:
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.h
test/CodeGenObjC/availability-check.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27827.89067.patch
Type: text/x-patch
Size: 3817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170219/6ba23b97/attachment.bin>
More information about the cfe-commits
mailing list