summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-10-15 20:37:01 +0000
committerNico Weber <nicolasweber@gmx.de>2012-10-15 20:37:01 +0000
commitbec2bf132628869402899a10c086a0759025ee08 (patch)
treeb955c6a81be612d718b25c3593986133c3af3808 /clang/lib/CodeGen/CGObjC.cpp
parenta514ebc1db35f9ba8066d6eb55a3074aeaf5d6b9 (diff)
downloadbcm5719-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/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp9
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(),
OpenPOWER on IntegriCloud