add a const version of the lookupFieldDeclForIvar method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68094 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 18a3a42..2e350c8 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -650,9 +650,7 @@
 void ASTContext::setFieldDecl(const ObjCInterfaceDecl *OI,
                               const ObjCIvarDecl *Ivar,
                               const ObjCIvarRefExpr *MRef) {
-  FieldDecl *FD = (const_cast<ObjCInterfaceDecl *>(OI))->
-                    lookupFieldDeclForIvar(*this, Ivar);
-  ASTFieldForIvarRef[MRef] = FD;
+  ASTFieldForIvarRef[MRef] = OI->lookupFieldDeclForIvar(*this, Ivar);
 }
 
 /// getASTObjcInterfaceLayout - Get or compute information about the layout of