mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 19:44:38 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user