diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-14 22:33:34 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-02-14 22:33:34 +0000 |
commit | cfaed8d399a34e79fbab9f70eb4ea1bbeb81a02b (patch) | |
tree | 9fc8d863728dee252339c135914bb0ca26b40b74 /include/clang/AST/DeclObjC.h | |
parent | 62d0f569360a664018316e4a21a4e960560b271d (diff) |
objective-C: synthesize properties in order of their
declarations to synthesize their ivars in similar
determinstic order so they are laid out in
a determinstic order. // rdar://13192366
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclObjC.h')
-rw-r--r-- | include/clang/AST/DeclObjC.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index a09bcb50d7..1c5588f926 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -549,11 +549,14 @@ public: ObjCPropertyDecl *FindPropertyDeclaration(IdentifierInfo *PropertyId) const; typedef llvm::DenseMap<IdentifierInfo*, ObjCPropertyDecl*> PropertyMap; - + + typedef llvm::SmallVector<ObjCPropertyDecl*, 8> PropertyDeclOrder; + /// This routine collects list of properties to be implemented in the class. /// This includes, class's and its conforming protocols' properties. /// Note, the superclass's properties are not included in the list. - virtual void collectPropertiesToImplement(PropertyMap &PM) const {} + virtual void collectPropertiesToImplement(PropertyMap &PM, + PropertyDeclOrder &PO) const {} SourceLocation getAtStartLoc() const { return AtStart; } void setAtStartLoc(SourceLocation Loc) { AtStart = Loc; } @@ -1090,7 +1093,8 @@ public: ObjCPropertyDecl *FindPropertyVisibleInPrimaryClass(IdentifierInfo *PropertyId) const; - virtual void collectPropertiesToImplement(PropertyMap &PM) const; + virtual void collectPropertiesToImplement(PropertyMap &PM, + PropertyDeclOrder &PO) const; /// isSuperClassOf - Return true if this class is the specified class or is a /// super class of the specified interface class. @@ -1489,7 +1493,8 @@ public: return getFirstDeclaration(); } - virtual void collectPropertiesToImplement(PropertyMap &PM) const; + virtual void collectPropertiesToImplement(PropertyMap &PM, + PropertyDeclOrder &PO) const; static bool classof(const Decl *D) { return classofKind(D->getKind()); } static bool classofKind(Kind K) { return K == ObjCProtocol; } |