diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-04-19 19:05:03 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-04-19 19:05:03 +0000 |
commit | 01b705e9c05316fd5cfce9115449b72f5f8610c5 (patch) | |
tree | 9afef9ddd0295248e037be4e8b6f21812f6bcc8d /clang/lib/CodeGen | |
parent | 7a81d674f6bc020d88883c8083630201ecc9a9ca (diff) | |
download | bcm5719-llvm-01b705e9c05316fd5cfce9115449b72f5f8610c5.tar.gz bcm5719-llvm-01b705e9c05316fd5cfce9115449b72f5f8610c5.zip |
ObjC Class Property: don't emit class properties on old deployment targets.
For old deployment targets, emit nil for all class property lists.
rdar://25616128
llvm-svn: 266800
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 3985201cc52..91baafa050c 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -2953,6 +2953,15 @@ llvm::Constant *CGObjCCommonMac::EmitPropertyList(Twine Name, const ObjCContainerDecl *OCD, const ObjCCommonTypesHelper &ObjCTypes, bool IsClassProperty) { + if (IsClassProperty) { + // Make this entry NULL for OS X with deployment target < 10.11, for iOS + // with deployment target < 9.0. + const llvm::Triple &Triple = CGM.getTarget().getTriple(); + if ((Triple.isMacOSX() && Triple.isMacOSXVersionLT(10, 11)) || + (Triple.isiOS() && Triple.isOSVersionLT(9))) + return llvm::Constant::getNullValue(ObjCTypes.PropertyListPtrTy); + } + SmallVector<llvm::Constant *, 16> Properties; llvm::SmallPtrSet<const IdentifierInfo*, 16> PropertySet; |