forked from OSchip/llvm-project
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:
parent
26794fe096
commit
70a315c363
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue