diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-12 20:47:08 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-12 20:47:08 +0000 |
commit | 3a02b44e3948f7762dbfba94b7961281ca29d022 (patch) | |
tree | b27da1f33f8022d0df58b81668a3d700cb850a4a | |
parent | 261f5b47323d5afd32da83e71284a6258791f72f (diff) |
metadata generated by the compiler does not include the weak
attribute of a property. patch by Remy Demarest fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137509 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclObjC.h | 4 | ||||
-rw-r--r-- | lib/AST/ASTContext.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 520a3780c1..d7ce893113 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -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; } diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index cd7d5080e8..7acc22abcc 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -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; } } |