summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-04-10 22:42:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-04-10 22:42:54 +0000
commit60331be08da5ef89a416a495c9a7bb9b8b375dea (patch)
treef7958b770c0e53e79503527a23aeecf1215806ad /clang/lib/Sema/SemaDeclObjC.cpp
parent8c920c9220941ec79aa9909fc32c805579d0ee71 (diff)
downloadbcm5719-llvm-60331be08da5ef89a416a495c9a7bb9b8b375dea.tar.gz
bcm5719-llvm-60331be08da5ef89a416a495c9a7bb9b8b375dea.zip
Fix another fallout from defining __weak unconditionally.
llvm-svn: 68834
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 898ecbb4716..74a03164313 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1840,7 +1840,8 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
return DeclPtrTy();
}
if ((Context.isObjCObjectPointerType(property->getType()) ||
- PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak()) {
+ PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak() &&
+ getLangOptions().getGCMode() != LangOptions::NonGC) {
Diag(PropertyLoc, diag::error_strong_property)
<< property->getDeclName() << Ivar->getDeclName();
return DeclPtrTy();
OpenPOWER on IntegriCloud