diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-15 20:35:07 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-15 20:35:07 +0000 |
commit | fd64bb635dc221baa19f81d5d2a084f7eb269f7f (patch) | |
tree | cc7de8b7ad8802f40468ace0b831c274ca97109e /lib/CodeGen/CGObjCGNU.cpp | |
parent | 0ea76727ae91bca918a8414ed85b530eddcfedeb (diff) |
Code gen. for ivar references; including bitfield
ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
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)); } |