summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/ASTContext.h2
-rw-r--r--clang/lib/AST/ASTContext.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index a39095f4f8a..ca2b79579b4 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<FieldDecl*> &Fields) const;
const FieldDecl *getFieldDecl(const ObjCIvarRefExpr *MRef) {
llvm::DenseMap<const ObjCIvarRefExpr *, const FieldDecl*>::iterator I
= ASTFieldForIvarRef.find(MRef);
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 2100a66c389..4579fb5a605 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<FieldDecl*> &Fields) {
+void ASTContext::CollectObjCIvars(const ObjCInterfaceDecl *OI,
+ std::vector<FieldDecl*> &Fields) const {
const ObjCInterfaceDecl *SuperClass = OI->getSuperClass();
if (SuperClass)
CollectObjCIvars(SuperClass, Fields);
OpenPOWER on IntegriCloud