]> granicus.if.org Git - clang/commitdiff
Moved CollectObjCIvars to more commonly available place
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 5 Mar 2009 20:08:48 +0000 (20:08 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 5 Mar 2009 20:08:48 +0000 (20:08 +0000)
for future use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66184 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp

index a39095f4f8a725af6c6f9508402328886e3c2d95..ca2b79579b453c26013c62f2e0519293330a4d2c 100644 (file)
@@ -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);
index 2100a66c3896921a346b9ced4d6c8e704fe513c9..4579fb5a6053172f982437d7a0d75d7bad0a09f0 100644 (file)
@@ -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);