diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-20 00:37:55 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-20 00:37:55 +0000 |
commit | 60952f94cf67ddb566600434857cad7a48264c3b (patch) | |
tree | 87f9620c3044ac5aa104b63960d0acdc815152dd /lib/CodeGen | |
parent | 91636d6c4c07fd2edf19a510b02c6e793a28741f (diff) |
Remove non-const form of lookupFieldDeclForIvar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 2ac4f9c7df..e22efa162a 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -195,7 +195,7 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, Types.ConvertType(PD->getType()))); EmitReturnOfRValue(RV, PD->getType()); } else { - FieldDecl *Field = + const FieldDecl *Field = IMP->getClassInterface()->lookupFieldDeclForIvar(getContext(), Ivar); LValue LV = EmitLValueForIvar(TypeOfSelfObject(), LoadObjCSelf(), Ivar, Field, 0); diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index f7936fda55..2bbb15f017 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -764,7 +764,8 @@ 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)); + const FieldDecl *Field = + ClassDecl->lookupFieldDeclForIvar(Context, (*iter)); int offset = (int)Layout->getElementOffset(CGM.getTypes().getLLVMFieldNo(Field)); IvarOffsets.push_back( @@ -1105,7 +1106,8 @@ llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGen::CodeGenFunction &CGF, CGM.getContext().getObjCInterfaceType(Interface)); const llvm::StructLayout *Layout = CGM.getTargetData().getStructLayout(cast<llvm::StructType>(InterfaceLTy)); - FieldDecl *Field = Interface->lookupFieldDeclForIvar(CGM.getContext(), Ivar); + const FieldDecl *Field = + Interface->lookupFieldDeclForIvar(CGM.getContext(), Ivar); uint64_t Offset = Layout->getElementOffset(CGM.getTypes().getLLVMFieldNo(Field)); diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index e04f723b1d..e92796b5ba 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -2400,7 +2400,8 @@ llvm::Value *CGObjCMac::EmitIvarOffset(CodeGen::CodeGenFunction &CGF, ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) { const llvm::StructLayout *Layout = GetInterfaceDeclStructLayout(Interface); - FieldDecl *Field = Interface->lookupFieldDeclForIvar(CGM.getContext(), Ivar); + const FieldDecl *Field = + Interface->lookupFieldDeclForIvar(CGM.getContext(), Ivar); uint64_t Offset = GetIvarBaseOffset(Layout, Field); return llvm::ConstantInt::get( CGM.getTypes().ConvertType(CGM.getContext().LongTy), |