Remove non-const form of lookupFieldDeclForIvar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index f7936fd..2bbb15f 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -764,7 +764,8 @@
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 @@
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));