minor refactoring to improve compile-time performance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147963 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 52b48cc..b4aee7c 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -642,9 +642,9 @@
     QualType PropertyIvarType = PropType.getNonReferenceType();
     
     if (getLangOptions().ObjCAutoRefCount &&
-        PropertyIvarType->isObjCRetainableType() &&
         (property->getPropertyAttributesAsWritten() &
-         ObjCPropertyDecl::OBJC_PR_readonly)) {
+         ObjCPropertyDecl::OBJC_PR_readonly) &&
+        PropertyIvarType->isObjCRetainableType()) {
       setImpliedPropertyAttributeForReadOnlyProperty(property, Ivar);    
     }