Moved CollectObjCIvars to more commonly available place

for future use.

llvm-svn: 66184
This commit is contained in:
Fariborz Jahanian 2009-03-05 20:08:48 +00:00
parent 2c2f192c74
commit 631c5818ab
2 changed files with 4 additions and 2 deletions

View 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);

View 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);