diff options
| -rw-r--r-- | clang/include/clang/AST/DeclObjC.h | 4 | ||||
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index 520a3780c1c..d7ce893113c 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/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/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index cd7d5080e8f..7acc22abcc2 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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; } } |

