diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-10-15 20:37:01 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-10-15 20:37:01 +0000 |
commit | bec2bf132628869402899a10c086a0759025ee08 (patch) | |
tree | b955c6a81be612d718b25c3593986133c3af3808 /clang/lib/CodeGen | |
parent | a514ebc1db35f9ba8066d6eb55a3074aeaf5d6b9 (diff) | |
download | bcm5719-llvm-bec2bf132628869402899a10c086a0759025ee08.tar.gz bcm5719-llvm-bec2bf132628869402899a10c086a0759025ee08.zip |
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
See PR14013.
llvm-svn: 165962
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index cea97317889..cd1ed8913d4 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -1041,7 +1041,12 @@ static bool hasTrivialSetExpr(const ObjCPropertyImplDecl *PID) { static bool UseOptimizedSetter(CodeGenModule &CGM) { if (CGM.getLangOpts().getGC() != LangOptions::NonGC) return false; - return CGM.getLangOpts().ObjCRuntime.hasOptimizedSetter(); + const TargetInfo &Target = CGM.getContext().getTargetInfo(); + + if (Target.getPlatformName() != "macosx") + return false; + + return Target.getPlatformMinVersion() >= VersionTuple(10, 8); } void @@ -1101,7 +1106,7 @@ CodeGenFunction::generateObjCSetterBody(const ObjCImplementationDecl *classImpl, llvm::Value *setOptimizedPropertyFn = 0; llvm::Value *setPropertyFn = 0; if (UseOptimizedSetter(CGM)) { - // 10.8 and iOS 6.0 code and GC is off + // 10.8 code and GC is off setOptimizedPropertyFn = CGM.getObjCRuntime() .GetOptimizedPropertySetFunction(strategy.isAtomic(), |