diff options
Diffstat (limited to 'lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index aa96bc53ea..08c9b938f1 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -720,8 +720,9 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) { Context.getObjCEncodingForType((*iter)->getType(), TypeStr); IvarTypes.push_back(CGM.GetAddrOfConstantCString(TypeStr)); // Get the offset + FieldDecl *Field = ClassDecl->lookupFieldDeclForIvar(Context, (*iter)); int offset = - (int)Layout->getElementOffset(CGM.getTypes().getLLVMFieldNo(*iter)); + (int)Layout->getElementOffset(CGM.getTypes().getLLVMFieldNo(Field)); IvarOffsets.push_back( llvm::ConstantInt::get(llvm::Type::Int32Ty, offset)); } |