[PATCH] D82823: canonicalize macOS 10.16 availability to macOS 11 while preserving uses of if @available macOS 10.16

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 17:13:26 PDT 2020


arphaman created this revision.
arphaman added reviewers: erik.pilkington, steven_wu.
Herald added subscribers: ributzka, dexonsmith, jkorous.
Herald added a reviewer: aaron.ballman.

This patch canonicalizes the macOS versions in the `availability`, so that clang can treat macOS 10.16 availability as macOS 11 availability. The `if (@available (macOS 10.16, *)` checks still preserve their original version in the generated code to ensure that the software running on macOS Big Sur Beta 1 can still exhibits the expected runtime behavior for the `10.16` availability checks.


https://reviews.llvm.org/D82823

Files:
  clang/include/clang/AST/ExprObjC.h
  clang/lib/CodeGen/CGExprScalar.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Serialization/ASTReaderStmt.cpp
  clang/lib/Serialization/ASTWriterStmt.cpp
  clang/test/CodeGen/attr-availability-new.c
  clang/test/CodeGenObjC/availability-check.m
  clang/test/Sema/attr-availability-macos-new.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82823.274291.patch
Type: text/x-patch
Size: 11319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200630/a0916bc8/attachment-0001.bin>


More information about the cfe-commits mailing list