diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-20 21:21:08 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-20 21:21:08 +0000 |
commit | a50b3a20f1e396ec0a51c01797193b964d42cac7 (patch) | |
tree | d83a3b2e2ae52bf6452ab2bfae6facb2a8f9a227 /clang/lib/CodeGen/CGObjCMac.cpp | |
parent | 74c1f8ed7bd5b091214ce0f2e8ece83d45444f04 (diff) | |
download | bcm5719-llvm-a50b3a20f1e396ec0a51c01797193b964d42cac7.tar.gz bcm5719-llvm-a50b3a20f1e396ec0a51c01797193b964d42cac7.zip |
objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.
llvm-svn: 111679
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index ec13dd1cd27..57e36d9f946 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -3871,13 +3871,11 @@ llvm::Constant *CGObjCCommonMac::BuildIvarLayout( if (CGM.getLangOptions().getGCMode() == LangOptions::NonGC) return llvm::Constant::getNullValue(PtrTy); - llvm::SmallVector<FieldDecl*, 32> RecFields; + llvm::SmallVector<ObjCIvarDecl*, 32> Ivars; const ObjCInterfaceDecl *OI = OMD->getClassInterface(); - CGM.getContext().CollectObjCIvars(OI, RecFields); + CGM.getContext().DeepCollectObjCIvars(OI, true, Ivars); - // Add this implementations synthesized ivars. - llvm::SmallVector<ObjCIvarDecl*, 16> Ivars; - CGM.getContext().CollectNonClassIvars(OI, Ivars); + llvm::SmallVector<FieldDecl*, 32> RecFields; for (unsigned k = 0, e = Ivars.size(); k != e; ++k) RecFields.push_back(cast<FieldDecl>(Ivars[k])); |