aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-15 20:35:07 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-15 20:35:07 +0000
commitfd64bb635dc221baa19f81d5d2a084f7eb269f7f (patch)
treecc7de8b7ad8802f40468ace0b831c274ca97109e /lib/CodeGen/CGObjC.cpp
parent0ea76727ae91bca918a8414ed85b530eddcfedeb (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/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 0237b96b51..e419a7b959 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -190,7 +190,9 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP,
Types.ConvertType(PD->getType())));
EmitReturnOfRValue(RV, PD->getType());
} else {
- LValue LV = EmitLValueForIvar(LoadObjCSelf(), Ivar, 0);
+ FieldDecl *Field =
+ IMP->getClassInterface()->lookupFieldDeclForIvar(getContext(), Ivar);
+ LValue LV = EmitLValueForIvar(LoadObjCSelf(), Ivar, Field, 0);
if (hasAggregateLLVMType(Ivar->getType())) {
EmitAggregateCopy(ReturnValue, LV.getAddress(), Ivar->getType());
}