From 9a776695e9f3831e59519fd45d130bff20456d7a Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 7 Sep 2011 00:38:49 +0000 Subject: [PATCH] objc-gc: Don't force a __strong type'd property to be 'weak'. This prevents a crash and should probably be flagged as error - later to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139211 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaObjCProperty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index bf4939d9fd..9695b811ee 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -598,7 +598,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, !getLangOptions().ObjCAutoRefCount && getLangOptions().getGCMode() != LangOptions::NonGC); - if (PropertyIsGCWeak) + if (PropertyIsGCWeak && !PropType.isObjCGCStrong()) PropType = Context.getObjCGCQualType(PropType, Qualifiers::Weak); QualType PropertyIvarType = PropType; if (PropType->isReferenceType()) -- 2.40.0