metadata generated by the compiler does not include the weak

attribute of a property. patch by Remy Demarest fixes it.

llvm-svn: 137509
This commit is contained in:
Fariborz Jahanian 2011-08-12 20:47:08 +00:00
parent 26794fe096
commit 70a315c363
2 changed files with 4 additions and 1 deletions

View File

@ -1429,7 +1429,7 @@ public:
NumPropertyAttrsBits = 12
};
enum SetterKind { Assign, Retain, Copy };
enum SetterKind { Assign, Retain, Copy, Weak };
enum PropertyControl { None, Required, Optional };
private:
SourceLocation AtLoc; // location of @property
@ -1509,6 +1509,8 @@ public:
return Retain;
if (PropertyAttributes & OBJC_PR_copy)
return Copy;
if (PropertyAttributes & OBJC_PR_weak)
return Weak;
return Assign;
}

View File

@ -4078,6 +4078,7 @@ void ASTContext::getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD,
case ObjCPropertyDecl::Assign: break;
case ObjCPropertyDecl::Copy: S += ",C"; break;
case ObjCPropertyDecl::Retain: S += ",&"; break;
case ObjCPropertyDecl::Weak: S += ",W"; break;
}
}