diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index a39095f4f8a7..ca2b79579b45 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/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/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 2100a66c3896..4579fb5a6053 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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);