diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-10-15 22:23:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-10-15 22:23:53 +0000 |
commit | 7a0c064770355a4918df69f95de8dea6338a59a2 (patch) | |
tree | 432513d09dee9929231b3f91f2c2a41efa5bddeb /lib/CodeGen/CGObjC.cpp | |
parent | 6cf7d7d0866b431388001b972762ef6e1ec1664b (diff) |
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index cd1ed8913d..cea9731788 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -1041,12 +1041,7 @@ static bool hasTrivialSetExpr(const ObjCPropertyImplDecl *PID) { static bool UseOptimizedSetter(CodeGenModule &CGM) { if (CGM.getLangOpts().getGC() != LangOptions::NonGC) return false; - const TargetInfo &Target = CGM.getContext().getTargetInfo(); - - if (Target.getPlatformName() != "macosx") - return false; - - return Target.getPlatformMinVersion() >= VersionTuple(10, 8); + return CGM.getLangOpts().ObjCRuntime.hasOptimizedSetter(); } void @@ -1106,7 +1101,7 @@ CodeGenFunction::generateObjCSetterBody(const ObjCImplementationDecl *classImpl, llvm::Value *setOptimizedPropertyFn = 0; llvm::Value *setPropertyFn = 0; if (UseOptimizedSetter(CGM)) { - // 10.8 code and GC is off + // 10.8 and iOS 6.0 code and GC is off setOptimizedPropertyFn = CGM.getObjCRuntime() .GetOptimizedPropertySetFunction(strategy.isAtomic(), |