From: Fariborz Jahanian Date: Thu, 5 Mar 2009 20:08:48 +0000 (+0000) Subject: Moved CollectObjCIvars to more commonly available place X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88e469cf4240d4b898eacc0ad092019b022e0e50;p=clang Moved CollectObjCIvars to more commonly available place for future use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66184 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index a39095f4f8..ca2b79579b 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -458,6 +458,8 @@ public: const ASTRecordLayout &getASTObjCInterfaceLayout(const ObjCInterfaceDecl *D); const RecordDecl *addRecordToClass(const ObjCInterfaceDecl *D); + void CollectObjCIvars(const ObjCInterfaceDecl *OI, + std::vector &Fields) const; const FieldDecl *getFieldDecl(const ObjCIvarRefExpr *MRef) { llvm::DenseMap::iterator I = ASTFieldForIvarRef.find(MRef); diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 2100a66c38..4579fb5a60 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -576,8 +576,8 @@ void ASTRecordLayout::LayoutField(const FieldDecl *FD, unsigned FieldNo, Alignment = std::max(Alignment, FieldAlign); } -static void CollectObjCIvars(const ObjCInterfaceDecl *OI, - std::vector &Fields) { +void ASTContext::CollectObjCIvars(const ObjCInterfaceDecl *OI, + std::vector &Fields) const { const ObjCInterfaceDecl *SuperClass = OI->getSuperClass(); if (SuperClass) CollectObjCIvars(SuperClass, Fields);