aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-08-20 21:21:08 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-08-20 21:21:08 +0000
commit2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 (patch)
tree6ffe7fcf0b582777655da4fddf91842e14a83ba4 /lib/CodeGen
parentd9ca4ab3ed3637e97a19d716aa9fbd54c6a5f698 (diff)
objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index ec13dd1cd2..57e36d9f94 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/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]));