From 611ba3ea3300b71eb95dc4e45f20eee5dddd32e1 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 17 Jul 2011 15:40:56 +0000 Subject: Vendor import of clang trunk r135360: http://llvm.org/svn/llvm-project/cfe/trunk@135360 --- lib/AST/RecordLayoutBuilder.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/AST/RecordLayoutBuilder.cpp') diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index de0b1d0..5636a6f 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -1242,12 +1242,11 @@ void RecordLayoutBuilder::Layout(const ObjCInterfaceDecl *D) { } InitializeLayout(D); - + ObjCInterfaceDecl *OI = const_cast(D); // Layout each ivar sequentially. - llvm::SmallVector Ivars; - Context.ShallowCollectObjCIvars(D, Ivars); - for (unsigned i = 0, e = Ivars.size(); i != e; ++i) - LayoutField(Ivars[i]); + for (ObjCIvarDecl *IVD = OI->all_declared_ivar_begin(); + IVD; IVD = IVD->getNextIvar()) + LayoutField(IVD); // Finally, round the size of the total struct up to the alignment of the // struct itself. -- cgit v1.1